azure_mgmt_recovery_services_backup 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/azure_mgmt_recovery_services_backup.rb +5 -0
  4. data/lib/generated/azure_mgmt_recovery_services_backup.rb +175 -0
  5. data/lib/generated/azure_mgmt_recovery_services_backup/backup_engines.rb +253 -0
  6. data/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_results.rb +128 -0
  7. data/lib/generated/azure_mgmt_recovery_services_backup/backup_operation_statuses.rb +136 -0
  8. data/lib/generated/azure_mgmt_recovery_services_backup/backups.rb +149 -0
  9. data/lib/generated/azure_mgmt_recovery_services_backup/export_jobs_operation_results.rb +124 -0
  10. data/lib/generated/azure_mgmt_recovery_services_backup/item_level_recovery_connections.rb +276 -0
  11. data/lib/generated/azure_mgmt_recovery_services_backup/job_cancellations.rb +116 -0
  12. data/lib/generated/azure_mgmt_recovery_services_backup/job_details.rb +124 -0
  13. data/lib/generated/azure_mgmt_recovery_services_backup/job_operation_results.rb +117 -0
  14. data/lib/generated/azure_mgmt_recovery_services_backup/jobs.rb +369 -0
  15. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_backup_server_engine.rb +92 -0
  16. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmcontainer.rb +107 -0
  17. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotectable_item.rb +77 -0
  18. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_sclassic_compute_vmprotected_item.rb +136 -0
  19. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmcontainer.rb +107 -0
  20. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotectable_item.rb +77 -0
  21. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_scompute_vmprotected_item.rb +137 -0
  22. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmerror_info.rb +82 -0
  23. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob.rb +169 -0
  24. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_extended_info.rb +91 -0
  25. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmjob_task_details.rb +104 -0
  26. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item.rb +165 -0
  27. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotected_item_extended_info.rb +68 -0
  28. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_iaa_svmprotection_policy.rb +83 -0
  29. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_container.rb +85 -0
  30. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item.rb +121 -0
  31. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protected_item_extended_info.rb +67 -0
  32. data/lib/generated/azure_mgmt_recovery_services_backup/models/azure_sql_protection_policy.rb +68 -0
  33. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base.rb +112 -0
  34. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource.rb +97 -0
  35. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_engine_base_resource_list.rb +90 -0
  36. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_item_type.rb +22 -0
  37. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_management_type.rb +20 -0
  38. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request.rb +46 -0
  39. data/lib/generated/azure_mgmt_recovery_services_backup/models/backup_request_resource.rb +97 -0
  40. data/lib/generated/azure_mgmt_recovery_services_backup/models/bekdetails.rb +65 -0
  41. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsbackup_engine_query_object.rb +47 -0
  42. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmscontainer_query_object.rb +68 -0
  43. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmspoquery_object.rb +67 -0
  44. data/lib/generated/azure_mgmt_recovery_services_backup/models/bmsrpquery_object.rb +54 -0
  45. data/lib/generated/azure_mgmt_recovery_services_backup/models/client_script_for_connect.rb +67 -0
  46. data/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_format.rb +52 -0
  47. data/lib/generated/azure_mgmt_recovery_services_backup/models/daily_retention_schedule.rb +62 -0
  48. data/lib/generated/azure_mgmt_recovery_services_backup/models/data_source_type.rb +22 -0
  49. data/lib/generated/azure_mgmt_recovery_services_backup/models/day.rb +54 -0
  50. data/lib/generated/azure_mgmt_recovery_services_backup/models/day_of_week.rb +21 -0
  51. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_backup_engine.rb +92 -0
  52. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_error_info.rb +62 -0
  53. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job.rb +198 -0
  54. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_extended_info.rb +80 -0
  55. data/lib/generated/azure_mgmt_recovery_services_backup/models/dpm_job_task_details.rb +84 -0
  56. data/lib/generated/azure_mgmt_recovery_services_backup/models/encryption_details.rb +87 -0
  57. data/lib/generated/azure_mgmt_recovery_services_backup/models/export_jobs_operation_result_info.rb +70 -0
  58. data/lib/generated/azure_mgmt_recovery_services_backup/models/generic_recovery_point.rb +89 -0
  59. data/lib/generated/azure_mgmt_recovery_services_backup/models/get_protected_item_query_object.rb +45 -0
  60. data/lib/generated/azure_mgmt_recovery_services_backup/models/http_status_code.rb +61 -0
  61. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmcontainer.rb +118 -0
  62. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaa_svmprotectable_item.rb +82 -0
  63. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmbackup_request.rb +60 -0
  64. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmilrregistration_request.rb +92 -0
  65. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrecovery_point.rb +124 -0
  66. data/lib/generated/azure_mgmt_recovery_services_backup/models/iaas_vmrestore_request.rb +202 -0
  67. data/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest.rb +45 -0
  68. data/lib/generated/azure_mgmt_recovery_services_backup/models/ilrrequest_resource.rb +96 -0
  69. data/lib/generated/azure_mgmt_recovery_services_backup/models/instant_item_recovery_target.rb +52 -0
  70. data/lib/generated/azure_mgmt_recovery_services_backup/models/job.rb +121 -0
  71. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_operation_type.rb +20 -0
  72. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_query_object.rb +103 -0
  73. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource.rb +96 -0
  74. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_resource_list.rb +90 -0
  75. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_status.rb +21 -0
  76. data/lib/generated/azure_mgmt_recovery_services_backup/models/job_supported_action.rb +17 -0
  77. data/lib/generated/azure_mgmt_recovery_services_backup/models/kekdetails.rb +67 -0
  78. data/lib/generated/azure_mgmt_recovery_services_backup/models/key_and_secret_details.rb +63 -0
  79. data/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_retention_policy.rb +96 -0
  80. data/lib/generated/azure_mgmt_recovery_services_backup/models/long_term_schedule_policy.rb +48 -0
  81. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container.rb +137 -0
  82. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_container_extended_info.rb +95 -0
  83. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_error_info.rb +61 -0
  84. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item.rb +149 -0
  85. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_file_folder_protected_item_extended_info.rb +66 -0
  86. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job.rb +194 -0
  87. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_extended_info.rb +79 -0
  88. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_job_task_details.rb +84 -0
  89. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_protection_policy.rb +82 -0
  90. data/lib/generated/azure_mgmt_recovery_services_backup/models/mab_server_type.rb +25 -0
  91. data/lib/generated/azure_mgmt_recovery_services_backup/models/month_of_year.rb +27 -0
  92. data/lib/generated/azure_mgmt_recovery_services_backup/models/monthly_retention_schedule.rb +99 -0
  93. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info.rb +65 -0
  94. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base.rb +46 -0
  95. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_result_info_base_resource.rb +76 -0
  96. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status.rb +114 -0
  97. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_error.rb +54 -0
  98. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_extended_info.rb +47 -0
  99. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_job_extended_info.rb +58 -0
  100. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_jobs_extended_info.rb +83 -0
  101. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_provision_ilrextended_info.rb +61 -0
  102. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_status_values.rb +19 -0
  103. data/lib/generated/azure_mgmt_recovery_services_backup/models/operation_worker_response.rb +83 -0
  104. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item.rb +107 -0
  105. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_query_object.rb +81 -0
  106. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource.rb +96 -0
  107. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_resource_list.rb +90 -0
  108. data/lib/generated/azure_mgmt_recovery_services_backup/models/protected_item_state.rb +20 -0
  109. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container.rb +110 -0
  110. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource.rb +97 -0
  111. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_container_resource_list.rb +90 -0
  112. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy.rb +58 -0
  113. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_query_object.rb +47 -0
  114. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource.rb +97 -0
  115. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_policy_resource_list.rb +90 -0
  116. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_state.rb +20 -0
  117. data/lib/generated/azure_mgmt_recovery_services_backup/models/protection_status.rb +18 -0
  118. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point.rb +47 -0
  119. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource.rb +97 -0
  120. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_point_resource_list.rb +90 -0
  121. data/lib/generated/azure_mgmt_recovery_services_backup/models/recovery_type.rb +18 -0
  122. data/lib/generated/azure_mgmt_recovery_services_backup/models/resource_list.rb +45 -0
  123. data/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request.rb +46 -0
  124. data/lib/generated/azure_mgmt_recovery_services_backup/models/restore_request_resource.rb +97 -0
  125. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration.rb +60 -0
  126. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_duration_type.rb +19 -0
  127. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_policy.rb +46 -0
  128. data/lib/generated/azure_mgmt_recovery_services_backup/models/retention_schedule_format.rb +17 -0
  129. data/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_policy.rb +46 -0
  130. data/lib/generated/azure_mgmt_recovery_services_backup/models/schedule_run_type.rb +17 -0
  131. data/lib/generated/azure_mgmt_recovery_services_backup/models/simple_retention_policy.rb +60 -0
  132. data/lib/generated/azure_mgmt_recovery_services_backup/models/simple_schedule_policy.rb +108 -0
  133. data/lib/generated/azure_mgmt_recovery_services_backup/models/week_of_month.rb +19 -0
  134. data/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_format.rb +70 -0
  135. data/lib/generated/azure_mgmt_recovery_services_backup/models/weekly_retention_schedule.rb +81 -0
  136. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item.rb +80 -0
  137. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource.rb +97 -0
  138. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_protectable_item_resource_list.rb +90 -0
  139. data/lib/generated/azure_mgmt_recovery_services_backup/models/workload_type.rb +22 -0
  140. data/lib/generated/azure_mgmt_recovery_services_backup/models/yearly_retention_schedule.rb +119 -0
  141. data/lib/generated/azure_mgmt_recovery_services_backup/module_definition.rb +8 -0
  142. data/lib/generated/azure_mgmt_recovery_services_backup/protectable_items.rb +276 -0
  143. data/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_results.rb +142 -0
  144. data/lib/generated/azure_mgmt_recovery_services_backup/protected_item_operation_statuses.rb +154 -0
  145. data/lib/generated/azure_mgmt_recovery_services_backup/protected_items.rb +609 -0
  146. data/lib/generated/azure_mgmt_recovery_services_backup/protection_container_operation_results.rb +135 -0
  147. data/lib/generated/azure_mgmt_recovery_services_backup/protection_container_refresh_operation_results.rb +120 -0
  148. data/lib/generated/azure_mgmt_recovery_services_backup/protection_containers.rb +538 -0
  149. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policies.rb +566 -0
  150. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_results.rb +131 -0
  151. data/lib/generated/azure_mgmt_recovery_services_backup/protection_policy_operation_statuses.rb +143 -0
  152. data/lib/generated/azure_mgmt_recovery_services_backup/recovery_points.rb +386 -0
  153. data/lib/generated/azure_mgmt_recovery_services_backup/recovery_services_backup_client.rb +215 -0
  154. data/lib/generated/azure_mgmt_recovery_services_backup/restores.rb +150 -0
  155. data/lib/generated/azure_mgmt_recovery_services_backup/version.rb +8 -0
  156. metadata +268 -0
@@ -0,0 +1,90 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServicesBackup
7
+ module Models
8
+ #
9
+ # The list of WorkloadProtectableItem resources.
10
+ #
11
+ class WorkloadProtectableItemResourceList < ResourceList
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<WorkloadProtectableItemResource>] List of resources.
16
+ attr_accessor :value
17
+
18
+ # return [Proc] with next page method call.
19
+ attr_accessor :next_method
20
+
21
+ #
22
+ # Gets the rest of the items for the request, enabling auto-pagination.
23
+ #
24
+ # @return [Array<WorkloadProtectableItemResource>] operation results.
25
+ #
26
+ def get_all_items
27
+ items = @value
28
+ page = self
29
+ while page.next_link != nil do
30
+ page = page.get_next_page
31
+ items.concat(page.value)
32
+ end
33
+ items
34
+ end
35
+
36
+ #
37
+ # Gets the next page of results.
38
+ #
39
+ # @return [WorkloadProtectableItemResourceList] with next page content.
40
+ #
41
+ def get_next_page
42
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
43
+ unless response.nil?
44
+ @next_link = response.body.next_link
45
+ @value = response.body.value
46
+ self
47
+ end
48
+ end
49
+
50
+ #
51
+ # Mapper for WorkloadProtectableItemResourceList class as Ruby Hash.
52
+ # This will be used for serialization/deserialization.
53
+ #
54
+ def self.mapper()
55
+ {
56
+ required: false,
57
+ serialized_name: 'WorkloadProtectableItemResourceList',
58
+ type: {
59
+ name: 'Composite',
60
+ class_name: 'WorkloadProtectableItemResourceList',
61
+ model_properties: {
62
+ next_link: {
63
+ required: false,
64
+ serialized_name: 'nextLink',
65
+ type: {
66
+ name: 'String'
67
+ }
68
+ },
69
+ value: {
70
+ required: false,
71
+ serialized_name: 'value',
72
+ type: {
73
+ name: 'Sequence',
74
+ element: {
75
+ required: false,
76
+ serialized_name: 'WorkloadProtectableItemResourceElementType',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'WorkloadProtectableItemResource'
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
86
+ }
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,22 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServicesBackup
7
+ module Models
8
+ #
9
+ # Defines values for WorkloadType
10
+ #
11
+ module WorkloadType
12
+ Invalid = "Invalid"
13
+ VM = "VM"
14
+ FileFolder = "FileFolder"
15
+ AzureSqlDb = "AzureSqlDb"
16
+ SQLDB = "SQLDB"
17
+ Exchange = "Exchange"
18
+ Sharepoint = "Sharepoint"
19
+ DPMUnknown = "DPMUnknown"
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,119 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServicesBackup
7
+ module Models
8
+ #
9
+ # Yearly retention schedule.
10
+ #
11
+ class YearlyRetentionSchedule
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [RetentionScheduleFormat] Retention schedule format for the
16
+ # yearly retention policy. Possible values include: 'Invalid', 'Daily',
17
+ # 'Weekly'
18
+ attr_accessor :retention_schedule_format_type
19
+
20
+ # @return [Array<MonthOfYear>] List of the months of year for the yearly
21
+ # retention policy.
22
+ attr_accessor :months_of_year
23
+
24
+ # @return [DailyRetentionFormat] Daily retention format for the yearly
25
+ # retention policy.
26
+ attr_accessor :retention_schedule_daily
27
+
28
+ # @return [WeeklyRetentionFormat] Weekly retention format for the yearly
29
+ # retention policy.
30
+ attr_accessor :retention_schedule_weekly
31
+
32
+ # @return [Array<DateTime>] Retention times for the retention policy.
33
+ attr_accessor :retention_times
34
+
35
+ # @return [RetentionDuration] Retention duration for the retention
36
+ # policy.
37
+ attr_accessor :retention_duration
38
+
39
+
40
+ #
41
+ # Mapper for YearlyRetentionSchedule class as Ruby Hash.
42
+ # This will be used for serialization/deserialization.
43
+ #
44
+ def self.mapper()
45
+ {
46
+ required: false,
47
+ serialized_name: 'YearlyRetentionSchedule',
48
+ type: {
49
+ name: 'Composite',
50
+ class_name: 'YearlyRetentionSchedule',
51
+ model_properties: {
52
+ retention_schedule_format_type: {
53
+ required: false,
54
+ serialized_name: 'retentionScheduleFormatType',
55
+ type: {
56
+ name: 'Enum',
57
+ module: 'RetentionScheduleFormat'
58
+ }
59
+ },
60
+ months_of_year: {
61
+ required: false,
62
+ serialized_name: 'monthsOfYear',
63
+ type: {
64
+ name: 'Sequence',
65
+ element: {
66
+ required: false,
67
+ serialized_name: 'MonthOfYearElementType',
68
+ type: {
69
+ name: 'Enum',
70
+ module: 'MonthOfYear'
71
+ }
72
+ }
73
+ }
74
+ },
75
+ retention_schedule_daily: {
76
+ required: false,
77
+ serialized_name: 'retentionScheduleDaily',
78
+ type: {
79
+ name: 'Composite',
80
+ class_name: 'DailyRetentionFormat'
81
+ }
82
+ },
83
+ retention_schedule_weekly: {
84
+ required: false,
85
+ serialized_name: 'retentionScheduleWeekly',
86
+ type: {
87
+ name: 'Composite',
88
+ class_name: 'WeeklyRetentionFormat'
89
+ }
90
+ },
91
+ retention_times: {
92
+ required: false,
93
+ serialized_name: 'retentionTimes',
94
+ type: {
95
+ name: 'Sequence',
96
+ element: {
97
+ required: false,
98
+ serialized_name: 'DateTimeElementType',
99
+ type: {
100
+ name: 'DateTime'
101
+ }
102
+ }
103
+ }
104
+ },
105
+ retention_duration: {
106
+ required: false,
107
+ serialized_name: 'retentionDuration',
108
+ type: {
109
+ name: 'Composite',
110
+ class_name: 'RetentionDuration'
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ end
117
+ end
118
+ end
119
+ end
@@ -0,0 +1,8 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure end
7
+ module Azure::ARM end
8
+ module Azure::ARM::RecoveryServicesBackup end
@@ -0,0 +1,276 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 1.0.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::RecoveryServicesBackup
7
+ #
8
+ # Composite Swagger for Recovery Services Backup Client
9
+ #
10
+ class ProtectableItems
11
+ include Azure::ARM::RecoveryServicesBackup::Models
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the ProtectableItems class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return [RecoveryServicesBackupClient] reference to the RecoveryServicesBackupClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Based on the query filter and the pagination parameters, this operation
27
+ # provides a pageable list of objects within the subscription that can be
28
+ # protected.
29
+ #
30
+ # @param vault_name [String] The name of the Recovery Services vault.
31
+ # @param resource_group_name [String] The name of the resource group associated
32
+ # with the Recovery Services vault.
33
+ # @param filter [String] Using the following query filters, you can sort a
34
+ # specific backup item based on: type of backup item, status, name of the item,
35
+ # and more. providerType eq { AzureIaasVM, MAB, DPM, AzureBackupServer,
36
+ # AzureSql } and status eq { NotProtected , Protecting , Protected } and
37
+ # friendlyName {name} and skipToken eq {string which provides the next set of
38
+ # list} and topToken eq {int} and backupManagementType eq { AzureIaasVM, MAB,
39
+ # DPM, AzureBackupServer, AzureSql }.
40
+ # @param skip_token [String] The Skip Token filter.
41
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
42
+ # will be added to the HTTP request.
43
+ #
44
+ # @return [Array<WorkloadProtectableItemResource>] operation results.
45
+ #
46
+ def list(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
47
+ first_page = list_as_lazy(vault_name, resource_group_name, filter, skip_token, custom_headers)
48
+ first_page.get_all_items
49
+ end
50
+
51
+ #
52
+ # Based on the query filter and the pagination parameters, this operation
53
+ # provides a pageable list of objects within the subscription that can be
54
+ # protected.
55
+ #
56
+ # @param vault_name [String] The name of the Recovery Services vault.
57
+ # @param resource_group_name [String] The name of the resource group associated
58
+ # with the Recovery Services vault.
59
+ # @param filter [String] Using the following query filters, you can sort a
60
+ # specific backup item based on: type of backup item, status, name of the item,
61
+ # and more. providerType eq { AzureIaasVM, MAB, DPM, AzureBackupServer,
62
+ # AzureSql } and status eq { NotProtected , Protecting , Protected } and
63
+ # friendlyName {name} and skipToken eq {string which provides the next set of
64
+ # list} and topToken eq {int} and backupManagementType eq { AzureIaasVM, MAB,
65
+ # DPM, AzureBackupServer, AzureSql }.
66
+ # @param skip_token [String] The Skip Token filter.
67
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
68
+ # will be added to the HTTP request.
69
+ #
70
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
71
+ #
72
+ def list_with_http_info(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
73
+ list_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
74
+ end
75
+
76
+ #
77
+ # Based on the query filter and the pagination parameters, this operation
78
+ # provides a pageable list of objects within the subscription that can be
79
+ # protected.
80
+ #
81
+ # @param vault_name [String] The name of the Recovery Services vault.
82
+ # @param resource_group_name [String] The name of the resource group associated
83
+ # with the Recovery Services vault.
84
+ # @param filter [String] Using the following query filters, you can sort a
85
+ # specific backup item based on: type of backup item, status, name of the item,
86
+ # and more. providerType eq { AzureIaasVM, MAB, DPM, AzureBackupServer,
87
+ # AzureSql } and status eq { NotProtected , Protecting , Protected } and
88
+ # friendlyName {name} and skipToken eq {string which provides the next set of
89
+ # list} and topToken eq {int} and backupManagementType eq { AzureIaasVM, MAB,
90
+ # DPM, AzureBackupServer, AzureSql }.
91
+ # @param skip_token [String] The Skip Token filter.
92
+ # @param [Hash{String => String}] A hash of custom headers that will be added
93
+ # to the HTTP request.
94
+ #
95
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
96
+ #
97
+ def list_async(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
98
+ api_version = '2016-06-01'
99
+ fail ArgumentError, 'vault_name is nil' if vault_name.nil?
100
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
101
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
102
+
103
+
104
+ request_headers = {}
105
+
106
+ # Set Headers
107
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
108
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
109
+ path_template = '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupProtectableItems'
110
+
111
+ request_url = @base_url || @client.base_url
112
+
113
+ options = {
114
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
115
+ path_params: {'vaultName' => vault_name,'resourceGroupName' => resource_group_name,'subscriptionId' => @client.subscription_id},
116
+ query_params: {'api-version' => api_version,'$filter' => filter,'$skipToken' => skip_token},
117
+ headers: request_headers.merge(custom_headers || {}),
118
+ base_url: request_url
119
+ }
120
+ promise = @client.make_request_async(:get, path_template, options)
121
+
122
+ promise = promise.then do |result|
123
+ http_response = result.response
124
+ status_code = http_response.status
125
+ response_content = http_response.body
126
+ unless status_code == 200
127
+ error_model = JSON.load(response_content)
128
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
129
+ end
130
+
131
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
132
+ # Deserialize Response
133
+ if status_code == 200
134
+ begin
135
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
136
+ result_mapper = WorkloadProtectableItemResourceList.mapper()
137
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
138
+ rescue Exception => e
139
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
140
+ end
141
+ end
142
+
143
+ result
144
+ end
145
+
146
+ promise.execute
147
+ end
148
+
149
+ #
150
+ # Based on the query filter and the pagination parameters, this operation
151
+ # provides a pageable list of objects within the subscription that can be
152
+ # protected.
153
+ #
154
+ # @param next_page_link [String] The NextLink from the previous successful call
155
+ # to List operation.
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [WorkloadProtectableItemResourceList] operation results.
160
+ #
161
+ def list_next(next_page_link, custom_headers = nil)
162
+ response = list_next_async(next_page_link, custom_headers).value!
163
+ response.body unless response.nil?
164
+ end
165
+
166
+ #
167
+ # Based on the query filter and the pagination parameters, this operation
168
+ # provides a pageable list of objects within the subscription that can be
169
+ # protected.
170
+ #
171
+ # @param next_page_link [String] The NextLink from the previous successful call
172
+ # to List operation.
173
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
174
+ # will be added to the HTTP request.
175
+ #
176
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
177
+ #
178
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
179
+ list_next_async(next_page_link, custom_headers).value!
180
+ end
181
+
182
+ #
183
+ # Based on the query filter and the pagination parameters, this operation
184
+ # provides a pageable list of objects within the subscription that can be
185
+ # protected.
186
+ #
187
+ # @param next_page_link [String] The NextLink from the previous successful call
188
+ # to List operation.
189
+ # @param [Hash{String => String}] A hash of custom headers that will be added
190
+ # to the HTTP request.
191
+ #
192
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
193
+ #
194
+ def list_next_async(next_page_link, custom_headers = nil)
195
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
196
+
197
+
198
+ request_headers = {}
199
+
200
+ # Set Headers
201
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
202
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
203
+ path_template = '{nextLink}'
204
+
205
+ request_url = @base_url || @client.base_url
206
+
207
+ options = {
208
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
209
+ skip_encoding_path_params: {'nextLink' => next_page_link},
210
+ headers: request_headers.merge(custom_headers || {}),
211
+ base_url: request_url
212
+ }
213
+ promise = @client.make_request_async(:get, path_template, options)
214
+
215
+ promise = promise.then do |result|
216
+ http_response = result.response
217
+ status_code = http_response.status
218
+ response_content = http_response.body
219
+ unless status_code == 200
220
+ error_model = JSON.load(response_content)
221
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
222
+ end
223
+
224
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
225
+ # Deserialize Response
226
+ if status_code == 200
227
+ begin
228
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
229
+ result_mapper = WorkloadProtectableItemResourceList.mapper()
230
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
231
+ rescue Exception => e
232
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
233
+ end
234
+ end
235
+
236
+ result
237
+ end
238
+
239
+ promise.execute
240
+ end
241
+
242
+ #
243
+ # Based on the query filter and the pagination parameters, this operation
244
+ # provides a pageable list of objects within the subscription that can be
245
+ # protected.
246
+ #
247
+ # @param vault_name [String] The name of the Recovery Services vault.
248
+ # @param resource_group_name [String] The name of the resource group associated
249
+ # with the Recovery Services vault.
250
+ # @param filter [String] Using the following query filters, you can sort a
251
+ # specific backup item based on: type of backup item, status, name of the item,
252
+ # and more. providerType eq { AzureIaasVM, MAB, DPM, AzureBackupServer,
253
+ # AzureSql } and status eq { NotProtected , Protecting , Protected } and
254
+ # friendlyName {name} and skipToken eq {string which provides the next set of
255
+ # list} and topToken eq {int} and backupManagementType eq { AzureIaasVM, MAB,
256
+ # DPM, AzureBackupServer, AzureSql }.
257
+ # @param skip_token [String] The Skip Token filter.
258
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
259
+ # will be added to the HTTP request.
260
+ #
261
+ # @return [WorkloadProtectableItemResourceList] which provide lazy access to
262
+ # pages of the response.
263
+ #
264
+ def list_as_lazy(vault_name, resource_group_name, filter = nil, skip_token = nil, custom_headers = nil)
265
+ response = list_async(vault_name, resource_group_name, filter, skip_token, custom_headers).value!
266
+ unless response.nil?
267
+ page = response.body
268
+ page.next_method = Proc.new do |next_page_link|
269
+ list_next_async(next_page_link, custom_headers)
270
+ end
271
+ page
272
+ end
273
+ end
274
+
275
+ end
276
+ end