azure_mgmt_netapp 0.18.2 → 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-08-15-preview/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  3. data/lib/2019-05-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  4. data/lib/2019-06-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  5. data/lib/2019-07-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  6. data/lib/2019-08-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +1 -1
  7. data/lib/2019-10-01/generated/azure_mgmt_netapp.rb +71 -0
  8. data/lib/2019-10-01/generated/azure_mgmt_netapp/accounts.rb +651 -0
  9. data/lib/2019-10-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +157 -0
  10. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/active_directory.rb +127 -0
  11. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  12. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
  13. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  14. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
  15. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  16. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  17. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  18. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
  19. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  20. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  21. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  22. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mount_target.rb +230 -0
  23. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/mount_target_list.rb +55 -0
  24. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  25. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  26. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  27. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  28. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  29. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  30. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  31. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  32. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  33. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  34. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  35. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  36. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  37. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  38. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshot.rb +158 -0
  39. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb +54 -0
  40. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  41. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume.rb +300 -0
  42. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  43. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
  44. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  45. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +50 -0
  46. data/lib/2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  47. data/lib/2019-10-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  48. data/lib/2019-10-01/generated/azure_mgmt_netapp/mount_targets.rb +136 -0
  49. data/lib/2019-10-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
  50. data/lib/2019-10-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  51. data/lib/2019-10-01/generated/azure_mgmt_netapp/pools.rb +675 -0
  52. data/lib/2019-10-01/generated/azure_mgmt_netapp/snapshots.rb +708 -0
  53. data/lib/2019-10-01/generated/azure_mgmt_netapp/volumes.rb +1228 -0
  54. data/lib/2019-11-01/generated/azure_mgmt_netapp.rb +70 -0
  55. data/lib/2019-11-01/generated/azure_mgmt_netapp/accounts.rb +651 -0
  56. data/lib/2019-11-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +153 -0
  57. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/active_directory.rb +139 -0
  58. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  59. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
  60. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  61. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
  62. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  63. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  64. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  65. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +113 -0
  66. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  67. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  68. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  69. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mount_target.rb +218 -0
  70. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb +152 -0
  71. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  72. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  73. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  74. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  75. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  76. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  77. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  78. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  79. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  80. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  81. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  82. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  83. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  84. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  85. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/snapshot.rb +139 -0
  86. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  87. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume.rb +315 -0
  88. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  89. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
  90. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  91. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +50 -0
  92. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  93. data/lib/2019-11-01/generated/azure_mgmt_netapp/models/volume_revert.rb +46 -0
  94. data/lib/2019-11-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  95. data/lib/2019-11-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
  96. data/lib/2019-11-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  97. data/lib/2019-11-01/generated/azure_mgmt_netapp/pools.rb +737 -0
  98. data/lib/2019-11-01/generated/azure_mgmt_netapp/snapshots.rb +794 -0
  99. data/lib/2019-11-01/generated/azure_mgmt_netapp/volumes.rb +1688 -0
  100. data/lib/2020-02-01/generated/azure_mgmt_netapp.rb +71 -0
  101. data/lib/2020-02-01/generated/azure_mgmt_netapp/accounts.rb +709 -0
  102. data/lib/2020-02-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb +153 -0
  103. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/active_directory.rb +160 -0
  104. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/authorize_request.rb +46 -0
  105. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool.rb +161 -0
  106. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb +55 -0
  107. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb +133 -0
  108. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb +18 -0
  109. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/dimension.rb +57 -0
  110. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/endpoint_type.rb +16 -0
  111. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb +115 -0
  112. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb +16 -0
  113. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/metric_specification.rb +145 -0
  114. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mirror_state.rb +17 -0
  115. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mount_target.rb +218 -0
  116. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/mount_target_properties.rb +152 -0
  117. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account.rb +133 -0
  118. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb +55 -0
  119. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb +133 -0
  120. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation.rb +83 -0
  121. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation_display.rb +79 -0
  122. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/operation_list_result.rb +57 -0
  123. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/relationship_status.rb +16 -0
  124. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_object.rb +94 -0
  125. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_schedule.rb +19 -0
  126. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/replication_status.rb +93 -0
  127. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb +78 -0
  128. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb +72 -0
  129. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/service_level.rb +17 -0
  130. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/service_specification.rb +56 -0
  131. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/snapshot.rb +123 -0
  132. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/snapshots_list.rb +55 -0
  133. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume.rb +328 -0
  134. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_list.rb +55 -0
  135. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_patch.rb +147 -0
  136. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb +58 -0
  137. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb +62 -0
  138. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb +58 -0
  139. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_revert.rb +46 -0
  140. data/lib/2020-02-01/generated/azure_mgmt_netapp/models/volume_snapshot_properties.rb +46 -0
  141. data/lib/2020-02-01/generated/azure_mgmt_netapp/module_definition.rb +9 -0
  142. data/lib/2020-02-01/generated/azure_mgmt_netapp/net_app_resource.rb +291 -0
  143. data/lib/2020-02-01/generated/azure_mgmt_netapp/operations.rb +115 -0
  144. data/lib/2020-02-01/generated/azure_mgmt_netapp/pools.rb +737 -0
  145. data/lib/2020-02-01/generated/azure_mgmt_netapp/snapshots.rb +794 -0
  146. data/lib/2020-02-01/generated/azure_mgmt_netapp/volumes.rb +1688 -0
  147. data/lib/azure_mgmt_netapp.rb +3 -0
  148. data/lib/profiles/latest/modules/netapp_profile_module.rb +120 -94
  149. data/lib/version.rb +1 -1
  150. metadata +144 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec67ad1c2b91d5e62198bc94d594af02cfa2ec408adbaf69cbf5df7f71e25599
4
- data.tar.gz: 67ccbc7d98adfd90225340a0ba71178610d2f25809294a23507ea5f8442594e7
3
+ metadata.gz: 767ffc2604dcf172c20a17538d30ec13027ea7224de9fb3a97c15d9636aab653
4
+ data.tar.gz: 6714bb11f5f75d0e62a808f84b44f4d4ee1b78f7b56b00424d249a2af8c281b8
5
5
  SHA512:
6
- metadata.gz: f0d388ec9a5fbaa969439d57e3546fe59c3c50f2e0c3fdad95017405572bc0774ba0a05f936b3e4c7ad5afdaf254c70107b1a6967faf04c326b97cae822d5d89
7
- data.tar.gz: 88ee84b4f21deec643711ec8ee4bab89165419ea00d2eb7282cf5feff7fe2f8e4e3d16b99dd25b8281ebf9d50ea15908e92503040c21bbfe32a61313105fec05
6
+ metadata.gz: 30b6b9ed0f3fa25ef95084e28f182e5732fe926b286b1265fa00c01697bbfeff67ac202b3a515839326b73dbaf75aff39674cf4d352175bbf88fc8cadc15cdda
7
+ data.tar.gz: 83d0e401caefdf65739a1c6b574dd88e8367f914e7f3379dfd07c7004afe4c8656892b864595d86c49e45e221deb2fd33dbe0eb05c6b3f31599cb71272a563dd
@@ -146,7 +146,7 @@ module Azure::NetApp::Mgmt::V2017_08_15_preview
146
146
  #
147
147
  def add_telemetry
148
148
  sdk_information = 'azure_mgmt_netapp'
149
- sdk_information = "#{sdk_information}/0.18.2"
149
+ sdk_information = "#{sdk_information}/0.20.1"
150
150
  add_user_agent_information(sdk_information)
151
151
  end
152
152
  end
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_05_01
412
412
  #
413
413
  def add_telemetry
414
414
  sdk_information = 'azure_mgmt_netapp'
415
- sdk_information = "#{sdk_information}/0.18.2"
415
+ sdk_information = "#{sdk_information}/0.20.1"
416
416
  add_user_agent_information(sdk_information)
417
417
  end
418
418
  end
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_06_01
412
412
  #
413
413
  def add_telemetry
414
414
  sdk_information = 'azure_mgmt_netapp'
415
- sdk_information = "#{sdk_information}/0.18.2"
415
+ sdk_information = "#{sdk_information}/0.20.1"
416
416
  add_user_agent_information(sdk_information)
417
417
  end
418
418
  end
@@ -412,7 +412,7 @@ module Azure::NetApp::Mgmt::V2019_07_01
412
412
  #
413
413
  def add_telemetry
414
414
  sdk_information = 'azure_mgmt_netapp'
415
- sdk_information = "#{sdk_information}/0.18.2"
415
+ sdk_information = "#{sdk_information}/0.20.1"
416
416
  add_user_agent_information(sdk_information)
417
417
  end
418
418
  end
@@ -150,7 +150,7 @@ module Azure::NetApp::Mgmt::V2019_08_01
150
150
  #
151
151
  def add_telemetry
152
152
  sdk_information = 'azure_mgmt_netapp'
153
- sdk_information = "#{sdk_information}/0.18.2"
153
+ sdk_information = "#{sdk_information}/0.20.1"
154
154
  add_user_agent_information(sdk_information)
155
155
  end
156
156
  end
@@ -0,0 +1,71 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require '2019-10-01/generated/azure_mgmt_netapp/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::NetApp::Mgmt::V2019_10_01
23
+ autoload :Operations, '2019-10-01/generated/azure_mgmt_netapp/operations.rb'
24
+ autoload :NetAppResource, '2019-10-01/generated/azure_mgmt_netapp/net_app_resource.rb'
25
+ autoload :Accounts, '2019-10-01/generated/azure_mgmt_netapp/accounts.rb'
26
+ autoload :Pools, '2019-10-01/generated/azure_mgmt_netapp/pools.rb'
27
+ autoload :Volumes, '2019-10-01/generated/azure_mgmt_netapp/volumes.rb'
28
+ autoload :MountTargets, '2019-10-01/generated/azure_mgmt_netapp/mount_targets.rb'
29
+ autoload :Snapshots, '2019-10-01/generated/azure_mgmt_netapp/snapshots.rb'
30
+ autoload :AzureNetAppFilesManagementClient, '2019-10-01/generated/azure_mgmt_netapp/azure_net_app_files_management_client.rb'
31
+
32
+ module Models
33
+ autoload :ExportPolicyRule, '2019-10-01/generated/azure_mgmt_netapp/models/export_policy_rule.rb'
34
+ autoload :OperationDisplay, '2019-10-01/generated/azure_mgmt_netapp/models/operation_display.rb'
35
+ autoload :VolumePropertiesExportPolicy, '2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_export_policy.rb'
36
+ autoload :MetricSpecification, '2019-10-01/generated/azure_mgmt_netapp/models/metric_specification.rb'
37
+ autoload :ReplicationObject, '2019-10-01/generated/azure_mgmt_netapp/models/replication_object.rb'
38
+ autoload :Operation, '2019-10-01/generated/azure_mgmt_netapp/models/operation.rb'
39
+ autoload :VolumePropertiesDataProtection, '2019-10-01/generated/azure_mgmt_netapp/models/volume_properties_data_protection.rb'
40
+ autoload :ResourceNameAvailability, '2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability.rb'
41
+ autoload :Volume, '2019-10-01/generated/azure_mgmt_netapp/models/volume.rb'
42
+ autoload :ActiveDirectory, '2019-10-01/generated/azure_mgmt_netapp/models/active_directory.rb'
43
+ autoload :VolumeList, '2019-10-01/generated/azure_mgmt_netapp/models/volume_list.rb'
44
+ autoload :NetAppAccountList, '2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_list.rb'
45
+ autoload :ReplicationStatus, '2019-10-01/generated/azure_mgmt_netapp/models/replication_status.rb'
46
+ autoload :CapacityPool, '2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool.rb'
47
+ autoload :VolumePatchPropertiesExportPolicy, '2019-10-01/generated/azure_mgmt_netapp/models/volume_patch_properties_export_policy.rb'
48
+ autoload :CapacityPoolPatch, '2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_patch.rb'
49
+ autoload :VolumePatch, '2019-10-01/generated/azure_mgmt_netapp/models/volume_patch.rb'
50
+ autoload :ServiceSpecification, '2019-10-01/generated/azure_mgmt_netapp/models/service_specification.rb'
51
+ autoload :MountTarget, '2019-10-01/generated/azure_mgmt_netapp/models/mount_target.rb'
52
+ autoload :ResourceNameAvailabilityRequest, '2019-10-01/generated/azure_mgmt_netapp/models/resource_name_availability_request.rb'
53
+ autoload :MountTargetList, '2019-10-01/generated/azure_mgmt_netapp/models/mount_target_list.rb'
54
+ autoload :NetAppAccountPatch, '2019-10-01/generated/azure_mgmt_netapp/models/net_app_account_patch.rb'
55
+ autoload :Snapshot, '2019-10-01/generated/azure_mgmt_netapp/models/snapshot.rb'
56
+ autoload :Dimension, '2019-10-01/generated/azure_mgmt_netapp/models/dimension.rb'
57
+ autoload :SnapshotsList, '2019-10-01/generated/azure_mgmt_netapp/models/snapshots_list.rb'
58
+ autoload :NetAppAccount, '2019-10-01/generated/azure_mgmt_netapp/models/net_app_account.rb'
59
+ autoload :SnapshotPatch, '2019-10-01/generated/azure_mgmt_netapp/models/snapshot_patch.rb'
60
+ autoload :OperationListResult, '2019-10-01/generated/azure_mgmt_netapp/models/operation_list_result.rb'
61
+ autoload :AuthorizeRequest, '2019-10-01/generated/azure_mgmt_netapp/models/authorize_request.rb'
62
+ autoload :CapacityPoolList, '2019-10-01/generated/azure_mgmt_netapp/models/capacity_pool_list.rb'
63
+ autoload :InAvailabilityReasonType, '2019-10-01/generated/azure_mgmt_netapp/models/in_availability_reason_type.rb'
64
+ autoload :CheckNameResourceTypes, '2019-10-01/generated/azure_mgmt_netapp/models/check_name_resource_types.rb'
65
+ autoload :ServiceLevel, '2019-10-01/generated/azure_mgmt_netapp/models/service_level.rb'
66
+ autoload :EndpointType, '2019-10-01/generated/azure_mgmt_netapp/models/endpoint_type.rb'
67
+ autoload :ReplicationSchedule, '2019-10-01/generated/azure_mgmt_netapp/models/replication_schedule.rb'
68
+ autoload :RelationshipStatus, '2019-10-01/generated/azure_mgmt_netapp/models/relationship_status.rb'
69
+ autoload :MirrorState, '2019-10-01/generated/azure_mgmt_netapp/models/mirror_state.rb'
70
+ end
71
+ end
@@ -0,0 +1,651 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator.
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::NetApp::Mgmt::V2019_10_01
7
+ #
8
+ # Microsoft NetApp Azure Resource Provider specification
9
+ #
10
+ class Accounts
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the Accounts class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [AzureNetAppFilesManagementClient] reference to the AzureNetAppFilesManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Describe all NetApp Accounts in a resource group
26
+ #
27
+ # List and describe all NetApp accounts in the resource group.
28
+ #
29
+ # @param resource_group_name [String] The name of the resource group.
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [NetAppAccountList] operation results.
34
+ #
35
+ def list(resource_group_name, custom_headers:nil)
36
+ response = list_async(resource_group_name, custom_headers:custom_headers).value!
37
+ response.body unless response.nil?
38
+ end
39
+
40
+ #
41
+ # Describe all NetApp Accounts in a resource group
42
+ #
43
+ # List and describe all NetApp accounts in the resource group.
44
+ #
45
+ # @param resource_group_name [String] The name of the resource group.
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(resource_group_name, custom_headers:nil)
52
+ list_async(resource_group_name, custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Describe all NetApp Accounts in a resource group
57
+ #
58
+ # List and describe all NetApp accounts in the resource group.
59
+ #
60
+ # @param resource_group_name [String] The name of the resource group.
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(resource_group_name, custom_headers:nil)
67
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
68
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
69
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
70
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
71
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
72
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
73
+
74
+
75
+ request_headers = {}
76
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
77
+
78
+ # Set Headers
79
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
80
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
81
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts'
82
+
83
+ request_url = @base_url || @client.base_url
84
+
85
+ options = {
86
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
87
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name},
88
+ query_params: {'api-version' => @client.api_version},
89
+ headers: request_headers.merge(custom_headers || {}),
90
+ base_url: request_url
91
+ }
92
+ promise = @client.make_request_async(:get, path_template, options)
93
+
94
+ promise = promise.then do |result|
95
+ http_response = result.response
96
+ status_code = http_response.status
97
+ response_content = http_response.body
98
+ unless status_code == 200
99
+ error_model = JSON.load(response_content)
100
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
101
+ end
102
+
103
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
104
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
105
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
106
+ # Deserialize Response
107
+ if status_code == 200
108
+ begin
109
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
110
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccountList.mapper()
111
+ result.body = @client.deserialize(result_mapper, parsed_response)
112
+ rescue Exception => e
113
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
114
+ end
115
+ end
116
+
117
+ result
118
+ end
119
+
120
+ promise.execute
121
+ end
122
+
123
+ #
124
+ # Describe a NetApp Account
125
+ #
126
+ # Get the NetApp account
127
+ #
128
+ # @param resource_group_name [String] The name of the resource group.
129
+ # @param account_name [String] The name of the NetApp account
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [NetAppAccount] operation results.
134
+ #
135
+ def get(resource_group_name, account_name, custom_headers:nil)
136
+ response = get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Describe a NetApp Account
142
+ #
143
+ # Get the NetApp account
144
+ #
145
+ # @param resource_group_name [String] The name of the resource group.
146
+ # @param account_name [String] The name of the NetApp account
147
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
148
+ # will be added to the HTTP request.
149
+ #
150
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
151
+ #
152
+ def get_with_http_info(resource_group_name, account_name, custom_headers:nil)
153
+ get_async(resource_group_name, account_name, custom_headers:custom_headers).value!
154
+ end
155
+
156
+ #
157
+ # Describe a NetApp Account
158
+ #
159
+ # Get the NetApp account
160
+ #
161
+ # @param resource_group_name [String] The name of the resource group.
162
+ # @param account_name [String] The name of the NetApp account
163
+ # @param [Hash{String => String}] A hash of custom headers that will be added
164
+ # to the HTTP request.
165
+ #
166
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
167
+ #
168
+ def get_async(resource_group_name, account_name, custom_headers:nil)
169
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
170
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
171
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
172
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
173
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
174
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
175
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
176
+
177
+
178
+ request_headers = {}
179
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
180
+
181
+ # Set Headers
182
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
183
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
184
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
185
+
186
+ request_url = @base_url || @client.base_url
187
+
188
+ options = {
189
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
190
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
191
+ query_params: {'api-version' => @client.api_version},
192
+ headers: request_headers.merge(custom_headers || {}),
193
+ base_url: request_url
194
+ }
195
+ promise = @client.make_request_async(:get, path_template, options)
196
+
197
+ promise = promise.then do |result|
198
+ http_response = result.response
199
+ status_code = http_response.status
200
+ response_content = http_response.body
201
+ unless status_code == 200
202
+ error_model = JSON.load(response_content)
203
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
204
+ end
205
+
206
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
207
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
208
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
209
+ # Deserialize Response
210
+ if status_code == 200
211
+ begin
212
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
213
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
214
+ result.body = @client.deserialize(result_mapper, parsed_response)
215
+ rescue Exception => e
216
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
217
+ end
218
+ end
219
+
220
+ result
221
+ end
222
+
223
+ promise.execute
224
+ end
225
+
226
+ #
227
+ # Create or update a NetApp account
228
+ #
229
+ # Create or update the specified NetApp account within the resource group
230
+ #
231
+ # @param body [NetAppAccount] NetApp Account object supplied in the body of the
232
+ # operation.
233
+ # @param resource_group_name [String] The name of the resource group.
234
+ # @param account_name [String] The name of the NetApp account
235
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
236
+ # will be added to the HTTP request.
237
+ #
238
+ # @return [NetAppAccount] operation results.
239
+ #
240
+ def create_or_update(body, resource_group_name, account_name, custom_headers:nil)
241
+ response = create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
242
+ response.body unless response.nil?
243
+ end
244
+
245
+ #
246
+ # @param body [NetAppAccount] NetApp Account object supplied in the body of the
247
+ # operation.
248
+ # @param resource_group_name [String] The name of the resource group.
249
+ # @param account_name [String] The name of the NetApp account
250
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
251
+ # will be added to the HTTP request.
252
+ #
253
+ # @return [Concurrent::Promise] promise which provides async access to http
254
+ # response.
255
+ #
256
+ def create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
257
+ # Send request
258
+ promise = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers)
259
+
260
+ promise = promise.then do |response|
261
+ # Defining deserialization method.
262
+ deserialize_method = lambda do |parsed_response|
263
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
264
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
265
+ end
266
+
267
+ # Waiting for response.
268
+ @client.get_long_running_operation_result(response, deserialize_method)
269
+ end
270
+
271
+ promise
272
+ end
273
+
274
+ #
275
+ # Delete a NetApp account
276
+ #
277
+ # Delete the specified NetApp account
278
+ #
279
+ # @param resource_group_name [String] The name of the resource group.
280
+ # @param account_name [String] The name of the NetApp account
281
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
282
+ # will be added to the HTTP request.
283
+ #
284
+ def delete(resource_group_name, account_name, custom_headers:nil)
285
+ response = delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
286
+ nil
287
+ end
288
+
289
+ #
290
+ # @param resource_group_name [String] The name of the resource group.
291
+ # @param account_name [String] The name of the NetApp account
292
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
293
+ # will be added to the HTTP request.
294
+ #
295
+ # @return [Concurrent::Promise] promise which provides async access to http
296
+ # response.
297
+ #
298
+ def delete_async(resource_group_name, account_name, custom_headers:nil)
299
+ # Send request
300
+ promise = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers)
301
+
302
+ promise = promise.then do |response|
303
+ # Defining deserialization method.
304
+ deserialize_method = lambda do |parsed_response|
305
+ end
306
+
307
+ # Waiting for response.
308
+ @client.get_long_running_operation_result(response, deserialize_method)
309
+ end
310
+
311
+ promise
312
+ end
313
+
314
+ #
315
+ # Update a NetApp account
316
+ #
317
+ # Patch the specified NetApp account
318
+ #
319
+ # @param body [NetAppAccountPatch] NetApp Account object supplied in the body
320
+ # of the operation.
321
+ # @param resource_group_name [String] The name of the resource group.
322
+ # @param account_name [String] The name of the NetApp account
323
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
324
+ # will be added to the HTTP request.
325
+ #
326
+ # @return [NetAppAccount] operation results.
327
+ #
328
+ def update(body, resource_group_name, account_name, custom_headers:nil)
329
+ response = update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
330
+ response.body unless response.nil?
331
+ end
332
+
333
+ #
334
+ # Update a NetApp account
335
+ #
336
+ # Patch the specified NetApp account
337
+ #
338
+ # @param body [NetAppAccountPatch] NetApp Account object supplied in the body
339
+ # of the operation.
340
+ # @param resource_group_name [String] The name of the resource group.
341
+ # @param account_name [String] The name of the NetApp account
342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
343
+ # will be added to the HTTP request.
344
+ #
345
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
346
+ #
347
+ def update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
348
+ update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
349
+ end
350
+
351
+ #
352
+ # Update a NetApp account
353
+ #
354
+ # Patch the specified NetApp account
355
+ #
356
+ # @param body [NetAppAccountPatch] NetApp Account object supplied in the body
357
+ # of the operation.
358
+ # @param resource_group_name [String] The name of the resource group.
359
+ # @param account_name [String] The name of the NetApp account
360
+ # @param [Hash{String => String}] A hash of custom headers that will be added
361
+ # to the HTTP request.
362
+ #
363
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
364
+ #
365
+ def update_async(body, resource_group_name, account_name, custom_headers:nil)
366
+ fail ArgumentError, 'body is nil' if body.nil?
367
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
368
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
369
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
370
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
371
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
372
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
373
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
374
+
375
+
376
+ request_headers = {}
377
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
378
+
379
+ # Set Headers
380
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
381
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
382
+
383
+ # Serialize Request
384
+ request_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccountPatch.mapper()
385
+ request_content = @client.serialize(request_mapper, body)
386
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
387
+
388
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
389
+
390
+ request_url = @base_url || @client.base_url
391
+
392
+ options = {
393
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
394
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
395
+ query_params: {'api-version' => @client.api_version},
396
+ body: request_content,
397
+ headers: request_headers.merge(custom_headers || {}),
398
+ base_url: request_url
399
+ }
400
+ promise = @client.make_request_async(:patch, path_template, options)
401
+
402
+ promise = promise.then do |result|
403
+ http_response = result.response
404
+ status_code = http_response.status
405
+ response_content = http_response.body
406
+ unless status_code == 200 || status_code == 202
407
+ error_model = JSON.load(response_content)
408
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
409
+ end
410
+
411
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
412
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
413
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
414
+ # Deserialize Response
415
+ if status_code == 200
416
+ begin
417
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
418
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
419
+ result.body = @client.deserialize(result_mapper, parsed_response)
420
+ rescue Exception => e
421
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
422
+ end
423
+ end
424
+
425
+ result
426
+ end
427
+
428
+ promise.execute
429
+ end
430
+
431
+ #
432
+ # Create or update a NetApp account
433
+ #
434
+ # Create or update the specified NetApp account within the resource group
435
+ #
436
+ # @param body [NetAppAccount] NetApp Account object supplied in the body of the
437
+ # operation.
438
+ # @param resource_group_name [String] The name of the resource group.
439
+ # @param account_name [String] The name of the NetApp account
440
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
441
+ # will be added to the HTTP request.
442
+ #
443
+ # @return [NetAppAccount] operation results.
444
+ #
445
+ def begin_create_or_update(body, resource_group_name, account_name, custom_headers:nil)
446
+ response = begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
447
+ response.body unless response.nil?
448
+ end
449
+
450
+ #
451
+ # Create or update a NetApp account
452
+ #
453
+ # Create or update the specified NetApp account within the resource group
454
+ #
455
+ # @param body [NetAppAccount] NetApp Account object supplied in the body of the
456
+ # operation.
457
+ # @param resource_group_name [String] The name of the resource group.
458
+ # @param account_name [String] The name of the NetApp account
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
463
+ #
464
+ def begin_create_or_update_with_http_info(body, resource_group_name, account_name, custom_headers:nil)
465
+ begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:custom_headers).value!
466
+ end
467
+
468
+ #
469
+ # Create or update a NetApp account
470
+ #
471
+ # Create or update the specified NetApp account within the resource group
472
+ #
473
+ # @param body [NetAppAccount] NetApp Account object supplied in the body of the
474
+ # operation.
475
+ # @param resource_group_name [String] The name of the resource group.
476
+ # @param account_name [String] The name of the NetApp account
477
+ # @param [Hash{String => String}] A hash of custom headers that will be added
478
+ # to the HTTP request.
479
+ #
480
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
481
+ #
482
+ def begin_create_or_update_async(body, resource_group_name, account_name, custom_headers:nil)
483
+ fail ArgumentError, 'body is nil' if body.nil?
484
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
485
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
486
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
487
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
488
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
489
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
490
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
491
+
492
+
493
+ request_headers = {}
494
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
495
+
496
+ # Set Headers
497
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
498
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
499
+
500
+ # Serialize Request
501
+ request_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
502
+ request_content = @client.serialize(request_mapper, body)
503
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
504
+
505
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
506
+
507
+ request_url = @base_url || @client.base_url
508
+
509
+ options = {
510
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
511
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
512
+ query_params: {'api-version' => @client.api_version},
513
+ body: request_content,
514
+ headers: request_headers.merge(custom_headers || {}),
515
+ base_url: request_url
516
+ }
517
+ promise = @client.make_request_async(:put, path_template, options)
518
+
519
+ promise = promise.then do |result|
520
+ http_response = result.response
521
+ status_code = http_response.status
522
+ response_content = http_response.body
523
+ unless status_code == 200 || status_code == 201 || status_code == 202
524
+ error_model = JSON.load(response_content)
525
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
526
+ end
527
+
528
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
529
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
530
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
531
+ # Deserialize Response
532
+ if status_code == 200
533
+ begin
534
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
535
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
536
+ result.body = @client.deserialize(result_mapper, parsed_response)
537
+ rescue Exception => e
538
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
539
+ end
540
+ end
541
+ # Deserialize Response
542
+ if status_code == 201
543
+ begin
544
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
545
+ result_mapper = Azure::NetApp::Mgmt::V2019_10_01::Models::NetAppAccount.mapper()
546
+ result.body = @client.deserialize(result_mapper, parsed_response)
547
+ rescue Exception => e
548
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
549
+ end
550
+ end
551
+
552
+ result
553
+ end
554
+
555
+ promise.execute
556
+ end
557
+
558
+ #
559
+ # Delete a NetApp account
560
+ #
561
+ # Delete the specified NetApp account
562
+ #
563
+ # @param resource_group_name [String] The name of the resource group.
564
+ # @param account_name [String] The name of the NetApp account
565
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
566
+ # will be added to the HTTP request.
567
+ #
568
+ #
569
+ def begin_delete(resource_group_name, account_name, custom_headers:nil)
570
+ response = begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
571
+ nil
572
+ end
573
+
574
+ #
575
+ # Delete a NetApp account
576
+ #
577
+ # Delete the specified NetApp account
578
+ #
579
+ # @param resource_group_name [String] The name of the resource group.
580
+ # @param account_name [String] The name of the NetApp account
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
585
+ #
586
+ def begin_delete_with_http_info(resource_group_name, account_name, custom_headers:nil)
587
+ begin_delete_async(resource_group_name, account_name, custom_headers:custom_headers).value!
588
+ end
589
+
590
+ #
591
+ # Delete a NetApp account
592
+ #
593
+ # Delete the specified NetApp account
594
+ #
595
+ # @param resource_group_name [String] The name of the resource group.
596
+ # @param account_name [String] The name of the NetApp account
597
+ # @param [Hash{String => String}] A hash of custom headers that will be added
598
+ # to the HTTP request.
599
+ #
600
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
601
+ #
602
+ def begin_delete_async(resource_group_name, account_name, custom_headers:nil)
603
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
604
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
605
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MaxLength': '90'" if !resource_group_name.nil? && resource_group_name.length > 90
606
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'MinLength': '1'" if !resource_group_name.nil? && resource_group_name.length < 1
607
+ fail ArgumentError, "'resource_group_name' should satisfy the constraint - 'Pattern': '^[-\w\._\(\)]+$'" if !resource_group_name.nil? && resource_group_name.match(Regexp.new('^^[-\w\._\(\)]+$$')).nil?
608
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
609
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
610
+
611
+
612
+ request_headers = {}
613
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
614
+
615
+ # Set Headers
616
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
617
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
618
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}'
619
+
620
+ request_url = @base_url || @client.base_url
621
+
622
+ options = {
623
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
624
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'accountName' => account_name},
625
+ query_params: {'api-version' => @client.api_version},
626
+ headers: request_headers.merge(custom_headers || {}),
627
+ base_url: request_url
628
+ }
629
+ promise = @client.make_request_async(:delete, path_template, options)
630
+
631
+ promise = promise.then do |result|
632
+ http_response = result.response
633
+ status_code = http_response.status
634
+ response_content = http_response.body
635
+ unless status_code == 202 || status_code == 204
636
+ error_model = JSON.load(response_content)
637
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
638
+ end
639
+
640
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
641
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
642
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
643
+
644
+ result
645
+ end
646
+
647
+ promise.execute
648
+ end
649
+
650
+ end
651
+ end