azure_mgmt_customer_insights 0.15.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/lib/2017-01-01/generated/azure_mgmt_customer_insights.rb +132 -0
  3. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/authorization_policies.rb +641 -0
  4. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/connector_mappings.rb +554 -0
  5. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/connectors.rb +612 -0
  6. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb +192 -0
  7. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/hubs.rb +848 -0
  8. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/images.rb +240 -0
  9. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb +597 -0
  10. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb +696 -0
  11. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/links.rb +571 -0
  12. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/assignment_principal.rb +76 -0
  13. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy.rb +93 -0
  14. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.rb +99 -0
  15. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb +120 -0
  16. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/azure_blob_connector_properties.rb +46 -0
  17. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/calculation_window_types.rb +19 -0
  18. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/cardinality_types.rb +17 -0
  19. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/completion_operation_types.rb +17 -0
  20. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_list_result.rb +98 -0
  21. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_availability.rb +59 -0
  22. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.rb +60 -0
  23. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.rb +60 -0
  24. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_format.rb +104 -0
  25. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.rb +99 -0
  26. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_properties.rb +141 -0
  27. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.rb +245 -0
  28. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_states.rb +21 -0
  29. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_structure.rb +79 -0
  30. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_resource_format.rb +199 -0
  31. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_states.rb +20 -0
  32. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/connector_types.rb +20 -0
  33. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/crm_connector_entities.rb +68 -0
  34. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/crm_connector_properties.rb +100 -0
  35. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/data_source_precedence.rb +109 -0
  36. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/data_source_type.rb +17 -0
  37. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/enriching_kpi.rb +256 -0
  38. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/entity_type_definition.rb +268 -0
  39. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/entity_types.rb +18 -0
  40. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/error_management_types.rb +17 -0
  41. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/frequency_types.rb +19 -0
  42. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.rb +68 -0
  43. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/hub.rb +147 -0
  44. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/hub_billing_info_format.rb +78 -0
  45. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/hub_list_result.rb +98 -0
  46. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/image_definition.rb +68 -0
  47. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/instance_operation_type.rb +16 -0
  48. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/interaction_list_result.rb +99 -0
  49. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb +475 -0
  50. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_alias.rb +57 -0
  51. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_definition.rb +320 -0
  52. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_extract.rb +57 -0
  53. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_functions.rb +22 -0
  54. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.rb +76 -0
  55. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_list_result.rb +98 -0
  56. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.rb +46 -0
  57. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb +347 -0
  58. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_thresholds.rb +68 -0
  59. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/link_list_result.rb +98 -0
  60. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/link_resource_format.rb +230 -0
  61. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/link_types.rb +16 -0
  62. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb +166 -0
  63. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/operation.rb +59 -0
  64. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/operation_display.rb +72 -0
  65. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/operation_list_result.rb +103 -0
  66. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/participant.rb +127 -0
  67. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/participant_property_reference.rb +59 -0
  68. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/permission_types.rb +17 -0
  69. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.rb +65 -0
  70. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/profile_list_result.rb +98 -0
  71. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/profile_resource_format.rb +342 -0
  72. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/property_definition.rb +237 -0
  73. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/provisioning_states.rb +20 -0
  74. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/proxy_resource.rb +71 -0
  75. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.rb +70 -0
  76. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_list_result.rb +99 -0
  77. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb +238 -0
  78. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_list_result.rb +99 -0
  79. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb +239 -0
  80. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.rb +58 -0
  81. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_type_mapping.rb +58 -0
  82. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/relationships_lookup.rb +115 -0
  83. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/resource.rb +101 -0
  84. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/resource_set_description.rb +74 -0
  85. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/role_assignment_list_result.rb +99 -0
  86. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.rb +333 -0
  87. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/role_list_result.rb +98 -0
  88. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/role_resource_format.rb +84 -0
  89. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/role_types.rb +20 -0
  90. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb +67 -0
  91. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.rb +46 -0
  92. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_table.rb +90 -0
  93. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/status.rb +17 -0
  94. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/strong_id.rb +103 -0
  95. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.rb +69 -0
  96. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/type_properties_mapping.rb +82 -0
  97. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/view_list_result.rb +98 -0
  98. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/view_resource_format.rb +151 -0
  99. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/widget_type_list_result.rb +99 -0
  100. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb +174 -0
  101. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/module_definition.rb +9 -0
  102. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/operations.rb +218 -0
  103. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/profiles.rb +742 -0
  104. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/relationship_links.rb +616 -0
  105. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/relationships.rb +612 -0
  106. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/role_assignments.rb +572 -0
  107. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/roles.rb +229 -0
  108. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/views.rb +535 -0
  109. data/lib/2017-01-01/generated/azure_mgmt_customer_insights/widget_types.rb +326 -0
  110. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/authorization_policies.rb +39 -35
  111. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/connector_mappings.rb +33 -30
  112. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/connectors.rb +41 -38
  113. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb +4 -1
  114. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/hubs.rb +58 -54
  115. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/images.rb +12 -14
  116. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/interactions.rb +37 -34
  117. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/kpi.rb +47 -43
  118. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/links.rb +37 -34
  119. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/operations.rb +15 -13
  120. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/predictions.rb +59 -55
  121. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/profiles.rb +47 -43
  122. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/relationship_links.rb +41 -38
  123. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/relationships.rb +41 -38
  124. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/role_assignments.rb +37 -34
  125. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/roles.rb +15 -13
  126. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/views.rb +33 -30
  127. data/lib/2017-04-26/generated/azure_mgmt_customer_insights/widget_types.rb +21 -18
  128. data/lib/azure_mgmt_customer_insights.rb +1 -0
  129. data/lib/profiles/latest/customerinsights_latest_profile_client.rb +28 -9
  130. data/lib/profiles/latest/customerinsights_module_definition.rb +0 -1
  131. data/lib/profiles/latest/modules/customerinsights_profile_module.rb +356 -337
  132. data/lib/version.rb +1 -1
  133. metadata +110 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4a78f58a010cd7eea74a04917831ec35386aa12
4
- data.tar.gz: 5aa4bac2b1ed4d7509f69e5d80712e332d825332
3
+ metadata.gz: 32aabf82e930a51b7fa62f940cc51a7441cc02ae
4
+ data.tar.gz: 4728113934e7c5468eb0a5edf3b8b95090568b46
5
5
  SHA512:
6
- metadata.gz: 6a344e89adbd5a57b09455e4078bd82a0505a86bc1072e46631ccb90eeb63bf3be389ed241b2c9e4173c26039aca145f054c78614ad06989b9fb0fb59aab444d
7
- data.tar.gz: da209fd391d2ab082a3937ce333ead178994bfafae53de45677aaf6a4ca62ff7f644594d979e0c0d9d50353a8d054caee5bfa8d3b1aff7b8e29d4dceafbbe7a7
6
+ metadata.gz: 13be77718d5c7b85d8ab8b1a04e1c044b349c6a5742410f463892fa5e12a8acf17366b011fa5e7a284fb95f6c9fa11065aa950a707e823773291c7d0c66f10a2
7
+ data.tar.gz: 8c0f4a3ec560e91754fad86fbe1d83845ee86355788788ab9cce39fe415aaf12e99fc981d71c10c73a865f89b40ec3b02a190e0716010e48cf993ede7f8d4af6
@@ -0,0 +1,132 @@
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 '2017-01-01/generated/azure_mgmt_customer_insights/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::CustomerInsights::Mgmt::V2017_01_01
23
+ autoload :Operations, '2017-01-01/generated/azure_mgmt_customer_insights/operations.rb'
24
+ autoload :Hubs, '2017-01-01/generated/azure_mgmt_customer_insights/hubs.rb'
25
+ autoload :Profiles, '2017-01-01/generated/azure_mgmt_customer_insights/profiles.rb'
26
+ autoload :Interactions, '2017-01-01/generated/azure_mgmt_customer_insights/interactions.rb'
27
+ autoload :Relationships, '2017-01-01/generated/azure_mgmt_customer_insights/relationships.rb'
28
+ autoload :RelationshipLinks, '2017-01-01/generated/azure_mgmt_customer_insights/relationship_links.rb'
29
+ autoload :AuthorizationPolicies, '2017-01-01/generated/azure_mgmt_customer_insights/authorization_policies.rb'
30
+ autoload :Connectors, '2017-01-01/generated/azure_mgmt_customer_insights/connectors.rb'
31
+ autoload :ConnectorMappings, '2017-01-01/generated/azure_mgmt_customer_insights/connector_mappings.rb'
32
+ autoload :Kpi, '2017-01-01/generated/azure_mgmt_customer_insights/kpi.rb'
33
+ autoload :WidgetTypes, '2017-01-01/generated/azure_mgmt_customer_insights/widget_types.rb'
34
+ autoload :Views, '2017-01-01/generated/azure_mgmt_customer_insights/views.rb'
35
+ autoload :Links, '2017-01-01/generated/azure_mgmt_customer_insights/links.rb'
36
+ autoload :Roles, '2017-01-01/generated/azure_mgmt_customer_insights/roles.rb'
37
+ autoload :RoleAssignments, '2017-01-01/generated/azure_mgmt_customer_insights/role_assignments.rb'
38
+ autoload :Images, '2017-01-01/generated/azure_mgmt_customer_insights/images.rb'
39
+ autoload :CustomerInsightsManagementClient, '2017-01-01/generated/azure_mgmt_customer_insights/customer_insights_management_client.rb'
40
+
41
+ module Models
42
+ autoload :TypePropertiesMapping, '2017-01-01/generated/azure_mgmt_customer_insights/models/type_properties_mapping.rb'
43
+ autoload :HubBillingInfoFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/hub_billing_info_format.rb'
44
+ autoload :ParticipantPropertyReference, '2017-01-01/generated/azure_mgmt_customer_insights/models/participant_property_reference.rb'
45
+ autoload :HubListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/hub_list_result.rb'
46
+ autoload :RelationshipTypeFieldMapping, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_type_field_mapping.rb'
47
+ autoload :ProfileEnumValidValuesFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/profile_enum_valid_values_format.rb'
48
+ autoload :RelationshipTypeMapping, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_type_mapping.rb'
49
+ autoload :PropertyDefinition, '2017-01-01/generated/azure_mgmt_customer_insights/models/property_definition.rb'
50
+ autoload :RelationshipLinkFieldMapping, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_field_mapping.rb'
51
+ autoload :AuthorizationPolicy, '2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy.rb'
52
+ autoload :Participant, '2017-01-01/generated/azure_mgmt_customer_insights/models/participant.rb'
53
+ autoload :SalesforceTable, '2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_table.rb'
54
+ autoload :StrongId, '2017-01-01/generated/azure_mgmt_customer_insights/models/strong_id.rb'
55
+ autoload :AzureBlobConnectorProperties, '2017-01-01/generated/azure_mgmt_customer_insights/models/azure_blob_connector_properties.rb'
56
+ autoload :CrmConnectorProperties, '2017-01-01/generated/azure_mgmt_customer_insights/models/crm_connector_properties.rb'
57
+ autoload :ProfileListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/profile_list_result.rb'
58
+ autoload :ConnectorMappingFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_format.rb'
59
+ autoload :OperationListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/operation_list_result.rb'
60
+ autoload :ConnectorMappingStructure, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_structure.rb'
61
+ autoload :InteractionListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/interaction_list_result.rb'
62
+ autoload :ConnectorMappingProperties, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_properties.rb'
63
+ autoload :Operation, '2017-01-01/generated/azure_mgmt_customer_insights/models/operation.rb'
64
+ autoload :KpiGroupByMetadata, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_group_by_metadata.rb'
65
+ autoload :KpiListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_list_result.rb'
66
+ autoload :KpiAlias, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_alias.rb'
67
+ autoload :OperationDisplay, '2017-01-01/generated/azure_mgmt_customer_insights/models/operation_display.rb'
68
+ autoload :KpiDefinition, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_definition.rb'
69
+ autoload :SuggestRelationshipLinksResponse, '2017-01-01/generated/azure_mgmt_customer_insights/models/suggest_relationship_links_response.rb'
70
+ autoload :ProxyResource, '2017-01-01/generated/azure_mgmt_customer_insights/models/proxy_resource.rb'
71
+ autoload :ConnectorListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_list_result.rb'
72
+ autoload :MetadataDefinitionBase, '2017-01-01/generated/azure_mgmt_customer_insights/models/metadata_definition_base.rb'
73
+ autoload :RelationshipsLookup, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationships_lookup.rb'
74
+ autoload :WidgetTypeListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/widget_type_list_result.rb'
75
+ autoload :SalesforceDiscoverSetting, '2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_discover_setting.rb'
76
+ autoload :ConnectorMappingListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_list_result.rb'
77
+ autoload :CrmConnectorEntities, '2017-01-01/generated/azure_mgmt_customer_insights/models/crm_connector_entities.rb'
78
+ autoload :ImageDefinition, '2017-01-01/generated/azure_mgmt_customer_insights/models/image_definition.rb'
79
+ autoload :ConnectorMappingAvailability, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_availability.rb'
80
+ autoload :AuthorizationPolicyListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy_list_result.rb'
81
+ autoload :KpiThresholds, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_thresholds.rb'
82
+ autoload :GetImageUploadUrlInput, '2017-01-01/generated/azure_mgmt_customer_insights/models/get_image_upload_url_input.rb'
83
+ autoload :KpiExtract, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_extract.rb'
84
+ autoload :LinkListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/link_list_result.rb'
85
+ autoload :AssignmentPrincipal, '2017-01-01/generated/azure_mgmt_customer_insights/models/assignment_principal.rb'
86
+ autoload :DataSourcePrecedence, '2017-01-01/generated/azure_mgmt_customer_insights/models/data_source_precedence.rb'
87
+ autoload :RoleListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/role_list_result.rb'
88
+ autoload :ConnectorMappingErrorManagement, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_error_management.rb'
89
+ autoload :RelationshipListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_list_result.rb'
90
+ autoload :KpiParticipantProfilesMetadata, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_participant_profiles_metadata.rb'
91
+ autoload :RoleAssignmentListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/role_assignment_list_result.rb'
92
+ autoload :SalesforceConnectorProperties, '2017-01-01/generated/azure_mgmt_customer_insights/models/salesforce_connector_properties.rb'
93
+ autoload :RelationshipLinkListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_list_result.rb'
94
+ autoload :Resource, '2017-01-01/generated/azure_mgmt_customer_insights/models/resource.rb'
95
+ autoload :ResourceSetDescription, '2017-01-01/generated/azure_mgmt_customer_insights/models/resource_set_description.rb'
96
+ autoload :ConnectorMappingCompleteOperation, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_complete_operation.rb'
97
+ autoload :ViewListResult, '2017-01-01/generated/azure_mgmt_customer_insights/models/view_list_result.rb'
98
+ autoload :Hub, '2017-01-01/generated/azure_mgmt_customer_insights/models/hub.rb'
99
+ autoload :EntityTypeDefinition, '2017-01-01/generated/azure_mgmt_customer_insights/models/entity_type_definition.rb'
100
+ autoload :ProfileResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/profile_resource_format.rb'
101
+ autoload :InteractionResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/interaction_resource_format.rb'
102
+ autoload :KpiResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_resource_format.rb'
103
+ autoload :EnrichingKpi, '2017-01-01/generated/azure_mgmt_customer_insights/models/enriching_kpi.rb'
104
+ autoload :ConnectorResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_resource_format.rb'
105
+ autoload :ConnectorMappingResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_resource_format.rb'
106
+ autoload :AuthorizationPolicyResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/authorization_policy_resource_format.rb'
107
+ autoload :LinkResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/link_resource_format.rb'
108
+ autoload :RelationshipResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_resource_format.rb'
109
+ autoload :RelationshipLinkResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/relationship_link_resource_format.rb'
110
+ autoload :ViewResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/view_resource_format.rb'
111
+ autoload :WidgetTypeResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/widget_type_resource_format.rb'
112
+ autoload :RoleAssignmentResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/role_assignment_resource_format.rb'
113
+ autoload :RoleResourceFormat, '2017-01-01/generated/azure_mgmt_customer_insights/models/role_resource_format.rb'
114
+ autoload :EntityTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/entity_types.rb'
115
+ autoload :DataSourceType, '2017-01-01/generated/azure_mgmt_customer_insights/models/data_source_type.rb'
116
+ autoload :Status, '2017-01-01/generated/azure_mgmt_customer_insights/models/status.rb'
117
+ autoload :ProvisioningStates, '2017-01-01/generated/azure_mgmt_customer_insights/models/provisioning_states.rb'
118
+ autoload :PermissionTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/permission_types.rb'
119
+ autoload :ConnectorTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_types.rb'
120
+ autoload :ConnectorStates, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_states.rb'
121
+ autoload :ErrorManagementTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/error_management_types.rb'
122
+ autoload :FrequencyTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/frequency_types.rb'
123
+ autoload :CompletionOperationTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/completion_operation_types.rb'
124
+ autoload :ConnectorMappingStates, '2017-01-01/generated/azure_mgmt_customer_insights/models/connector_mapping_states.rb'
125
+ autoload :CalculationWindowTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/calculation_window_types.rb'
126
+ autoload :KpiFunctions, '2017-01-01/generated/azure_mgmt_customer_insights/models/kpi_functions.rb'
127
+ autoload :LinkTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/link_types.rb'
128
+ autoload :InstanceOperationType, '2017-01-01/generated/azure_mgmt_customer_insights/models/instance_operation_type.rb'
129
+ autoload :CardinalityTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/cardinality_types.rb'
130
+ autoload :RoleTypes, '2017-01-01/generated/azure_mgmt_customer_insights/models/role_types.rb'
131
+ end
132
+ end
@@ -0,0 +1,641 @@
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::CustomerInsights::Mgmt::V2017_01_01
7
+ #
8
+ # The Azure Customer Insights management API provides a RESTful set of web
9
+ # services that interact with Azure Customer Insights service to manage your
10
+ # resources. The API has entities that capture the relationship between an
11
+ # end user and the Azure Customer Insights service.
12
+ #
13
+ class AuthorizationPolicies
14
+ include MsRestAzure
15
+
16
+ #
17
+ # Creates and initializes a new instance of the AuthorizationPolicies class.
18
+ # @param client service class for accessing basic functionality.
19
+ #
20
+ def initialize(client)
21
+ @client = client
22
+ end
23
+
24
+ # @return [CustomerInsightsManagementClient] reference to the CustomerInsightsManagementClient
25
+ attr_reader :client
26
+
27
+ #
28
+ # Creates an authorization policy or updates an existing authorization policy.
29
+ #
30
+ # @param resource_group_name [String] The name of the resource group.
31
+ # @param hub_name [String] The name of the hub.
32
+ # @param authorization_policy_name [String] The name of the policy.
33
+ # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to
34
+ # the CreateOrUpdate authorization policy operation.
35
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
36
+ # will be added to the HTTP request.
37
+ #
38
+ # @return [AuthorizationPolicyResourceFormat] operation results.
39
+ #
40
+ def create_or_update(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers:nil)
41
+ response = create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers:custom_headers).value!
42
+ response.body unless response.nil?
43
+ end
44
+
45
+ #
46
+ # Creates an authorization policy or updates an existing authorization policy.
47
+ #
48
+ # @param resource_group_name [String] The name of the resource group.
49
+ # @param hub_name [String] The name of the hub.
50
+ # @param authorization_policy_name [String] The name of the policy.
51
+ # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to
52
+ # the CreateOrUpdate authorization policy operation.
53
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
54
+ # will be added to the HTTP request.
55
+ #
56
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
57
+ #
58
+ def create_or_update_with_http_info(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers:nil)
59
+ create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers:custom_headers).value!
60
+ end
61
+
62
+ #
63
+ # Creates an authorization policy or updates an existing authorization policy.
64
+ #
65
+ # @param resource_group_name [String] The name of the resource group.
66
+ # @param hub_name [String] The name of the hub.
67
+ # @param authorization_policy_name [String] The name of the policy.
68
+ # @param parameters [AuthorizationPolicyResourceFormat] Parameters supplied to
69
+ # the CreateOrUpdate authorization policy operation.
70
+ # @param [Hash{String => String}] A hash of custom headers that will be added
71
+ # to the HTTP request.
72
+ #
73
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
74
+ #
75
+ def create_or_update_async(resource_group_name, hub_name, authorization_policy_name, parameters, custom_headers:nil)
76
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
77
+ fail ArgumentError, 'hub_name is nil' if hub_name.nil?
78
+ fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_name.nil?
79
+ fail ArgumentError, "'authorization_policy_name' should satisfy the constraint - 'MaxLength': '50'" if !authorization_policy_name.nil? && authorization_policy_name.length > 50
80
+ fail ArgumentError, "'authorization_policy_name' should satisfy the constraint - 'MinLength': '1'" if !authorization_policy_name.nil? && authorization_policy_name.length < 1
81
+ fail ArgumentError, "'authorization_policy_name' should satisfy the constraint - 'Pattern': '^[A-Za-z0-9]$|^[A-Za-z0-9][\w-\.]*[A-Za-z0-9]$'" if !authorization_policy_name.nil? && authorization_policy_name.match(Regexp.new('^^[A-Za-z0-9]$|^[A-Za-z0-9][\w-\.]*[A-Za-z0-9]$$')).nil?
82
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
83
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
84
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
85
+
86
+
87
+ request_headers = {}
88
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
89
+
90
+ # Set Headers
91
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
92
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
93
+
94
+ # Serialize Request
95
+ request_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyResourceFormat.mapper()
96
+ request_content = @client.serialize(request_mapper, parameters)
97
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
98
+
99
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}'
100
+
101
+ request_url = @base_url || @client.base_url
102
+
103
+ options = {
104
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
105
+ path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id},
106
+ query_params: {'api-version' => @client.api_version},
107
+ body: request_content,
108
+ headers: request_headers.merge(custom_headers || {}),
109
+ base_url: request_url
110
+ }
111
+ promise = @client.make_request_async(:put, path_template, options)
112
+
113
+ promise = promise.then do |result|
114
+ http_response = result.response
115
+ status_code = http_response.status
116
+ response_content = http_response.body
117
+ unless status_code == 200 || status_code == 201
118
+ error_model = JSON.load(response_content)
119
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
120
+ end
121
+
122
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
123
+ # Deserialize Response
124
+ if status_code == 200
125
+ begin
126
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
127
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyResourceFormat.mapper()
128
+ result.body = @client.deserialize(result_mapper, parsed_response)
129
+ rescue Exception => e
130
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
131
+ end
132
+ end
133
+ # Deserialize Response
134
+ if status_code == 201
135
+ begin
136
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
137
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyResourceFormat.mapper()
138
+ result.body = @client.deserialize(result_mapper, parsed_response)
139
+ rescue Exception => e
140
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
141
+ end
142
+ end
143
+
144
+ result
145
+ end
146
+
147
+ promise.execute
148
+ end
149
+
150
+ #
151
+ # Gets an authorization policy in the hub.
152
+ #
153
+ # @param resource_group_name [String] The name of the resource group.
154
+ # @param hub_name [String] The name of the hub.
155
+ # @param authorization_policy_name [String] The name of the policy.
156
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
157
+ # will be added to the HTTP request.
158
+ #
159
+ # @return [AuthorizationPolicyResourceFormat] operation results.
160
+ #
161
+ def get(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
162
+ response = get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
163
+ response.body unless response.nil?
164
+ end
165
+
166
+ #
167
+ # Gets an authorization policy in the hub.
168
+ #
169
+ # @param resource_group_name [String] The name of the resource group.
170
+ # @param hub_name [String] The name of the hub.
171
+ # @param authorization_policy_name [String] The name of the policy.
172
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
173
+ # will be added to the HTTP request.
174
+ #
175
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
176
+ #
177
+ def get_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
178
+ get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
179
+ end
180
+
181
+ #
182
+ # Gets an authorization policy in the hub.
183
+ #
184
+ # @param resource_group_name [String] The name of the resource group.
185
+ # @param hub_name [String] The name of the hub.
186
+ # @param authorization_policy_name [String] The name of the policy.
187
+ # @param [Hash{String => String}] A hash of custom headers that will be added
188
+ # to the HTTP request.
189
+ #
190
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
191
+ #
192
+ def get_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
193
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
194
+ fail ArgumentError, 'hub_name is nil' if hub_name.nil?
195
+ fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_name.nil?
196
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
197
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
198
+
199
+
200
+ request_headers = {}
201
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
202
+
203
+ # Set Headers
204
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
205
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
206
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}'
207
+
208
+ request_url = @base_url || @client.base_url
209
+
210
+ options = {
211
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
212
+ path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id},
213
+ query_params: {'api-version' => @client.api_version},
214
+ headers: request_headers.merge(custom_headers || {}),
215
+ base_url: request_url
216
+ }
217
+ promise = @client.make_request_async(:get, path_template, options)
218
+
219
+ promise = promise.then do |result|
220
+ http_response = result.response
221
+ status_code = http_response.status
222
+ response_content = http_response.body
223
+ unless status_code == 200
224
+ error_model = JSON.load(response_content)
225
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
226
+ end
227
+
228
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
229
+ # Deserialize Response
230
+ if status_code == 200
231
+ begin
232
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
233
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyResourceFormat.mapper()
234
+ result.body = @client.deserialize(result_mapper, parsed_response)
235
+ rescue Exception => e
236
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
237
+ end
238
+ end
239
+
240
+ result
241
+ end
242
+
243
+ promise.execute
244
+ end
245
+
246
+ #
247
+ # Gets all the authorization policies in a specified hub.
248
+ #
249
+ # @param resource_group_name [String] The name of the resource group.
250
+ # @param hub_name [String] The name of the hub.
251
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
252
+ # will be added to the HTTP request.
253
+ #
254
+ # @return [Array<AuthorizationPolicyResourceFormat>] operation results.
255
+ #
256
+ def list_by_hub(resource_group_name, hub_name, custom_headers:nil)
257
+ first_page = list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers:custom_headers)
258
+ first_page.get_all_items
259
+ end
260
+
261
+ #
262
+ # Gets all the authorization policies in a specified hub.
263
+ #
264
+ # @param resource_group_name [String] The name of the resource group.
265
+ # @param hub_name [String] The name of the hub.
266
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
267
+ # will be added to the HTTP request.
268
+ #
269
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
270
+ #
271
+ def list_by_hub_with_http_info(resource_group_name, hub_name, custom_headers:nil)
272
+ list_by_hub_async(resource_group_name, hub_name, custom_headers:custom_headers).value!
273
+ end
274
+
275
+ #
276
+ # Gets all the authorization policies in a specified hub.
277
+ #
278
+ # @param resource_group_name [String] The name of the resource group.
279
+ # @param hub_name [String] The name of the hub.
280
+ # @param [Hash{String => String}] A hash of custom headers that will be added
281
+ # to the HTTP request.
282
+ #
283
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
284
+ #
285
+ def list_by_hub_async(resource_group_name, hub_name, custom_headers:nil)
286
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
287
+ fail ArgumentError, 'hub_name is nil' if hub_name.nil?
288
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
289
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
290
+
291
+
292
+ request_headers = {}
293
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
294
+
295
+ # Set Headers
296
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
297
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
298
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies'
299
+
300
+ request_url = @base_url || @client.base_url
301
+
302
+ options = {
303
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
304
+ path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'subscriptionId' => @client.subscription_id},
305
+ query_params: {'api-version' => @client.api_version},
306
+ headers: request_headers.merge(custom_headers || {}),
307
+ base_url: request_url
308
+ }
309
+ promise = @client.make_request_async(:get, path_template, options)
310
+
311
+ promise = promise.then do |result|
312
+ http_response = result.response
313
+ status_code = http_response.status
314
+ response_content = http_response.body
315
+ unless status_code == 200
316
+ error_model = JSON.load(response_content)
317
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
318
+ end
319
+
320
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
321
+ # Deserialize Response
322
+ if status_code == 200
323
+ begin
324
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
325
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyListResult.mapper()
326
+ result.body = @client.deserialize(result_mapper, parsed_response)
327
+ rescue Exception => e
328
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
329
+ end
330
+ end
331
+
332
+ result
333
+ end
334
+
335
+ promise.execute
336
+ end
337
+
338
+ #
339
+ # Regenerates the primary policy key of the specified authorization policy.
340
+ #
341
+ # @param resource_group_name [String] The name of the resource group.
342
+ # @param hub_name [String] The name of the hub.
343
+ # @param authorization_policy_name [String] The name of the policy.
344
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
345
+ # will be added to the HTTP request.
346
+ #
347
+ # @return [AuthorizationPolicy] operation results.
348
+ #
349
+ def regenerate_primary_key(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
350
+ response = regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
351
+ response.body unless response.nil?
352
+ end
353
+
354
+ #
355
+ # Regenerates the primary policy key of the specified authorization policy.
356
+ #
357
+ # @param resource_group_name [String] The name of the resource group.
358
+ # @param hub_name [String] The name of the hub.
359
+ # @param authorization_policy_name [String] The name of the policy.
360
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
361
+ # will be added to the HTTP request.
362
+ #
363
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
364
+ #
365
+ def regenerate_primary_key_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
366
+ regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
367
+ end
368
+
369
+ #
370
+ # Regenerates the primary policy key of the specified authorization policy.
371
+ #
372
+ # @param resource_group_name [String] The name of the resource group.
373
+ # @param hub_name [String] The name of the hub.
374
+ # @param authorization_policy_name [String] The name of the policy.
375
+ # @param [Hash{String => String}] A hash of custom headers that will be added
376
+ # to the HTTP request.
377
+ #
378
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
379
+ #
380
+ def regenerate_primary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
381
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
382
+ fail ArgumentError, 'hub_name is nil' if hub_name.nil?
383
+ fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_name.nil?
384
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
385
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
386
+
387
+
388
+ request_headers = {}
389
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
390
+
391
+ # Set Headers
392
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
393
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
394
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regeneratePrimaryKey'
395
+
396
+ request_url = @base_url || @client.base_url
397
+
398
+ options = {
399
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
400
+ path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id},
401
+ query_params: {'api-version' => @client.api_version},
402
+ headers: request_headers.merge(custom_headers || {}),
403
+ base_url: request_url
404
+ }
405
+ promise = @client.make_request_async(:post, path_template, options)
406
+
407
+ promise = promise.then do |result|
408
+ http_response = result.response
409
+ status_code = http_response.status
410
+ response_content = http_response.body
411
+ unless status_code == 200
412
+ error_model = JSON.load(response_content)
413
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
414
+ end
415
+
416
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
417
+ # Deserialize Response
418
+ if status_code == 200
419
+ begin
420
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
421
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicy.mapper()
422
+ result.body = @client.deserialize(result_mapper, parsed_response)
423
+ rescue Exception => e
424
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
425
+ end
426
+ end
427
+
428
+ result
429
+ end
430
+
431
+ promise.execute
432
+ end
433
+
434
+ #
435
+ # Regenerates the secondary policy key of the specified authorization policy.
436
+ #
437
+ # @param resource_group_name [String] The name of the resource group.
438
+ # @param hub_name [String] The name of the hub.
439
+ # @param authorization_policy_name [String] The name of the policy.
440
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
441
+ # will be added to the HTTP request.
442
+ #
443
+ # @return [AuthorizationPolicy] operation results.
444
+ #
445
+ def regenerate_secondary_key(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
446
+ response = regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
447
+ response.body unless response.nil?
448
+ end
449
+
450
+ #
451
+ # Regenerates the secondary policy key of the specified authorization policy.
452
+ #
453
+ # @param resource_group_name [String] The name of the resource group.
454
+ # @param hub_name [String] The name of the hub.
455
+ # @param authorization_policy_name [String] The name of the policy.
456
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
457
+ # will be added to the HTTP request.
458
+ #
459
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
460
+ #
461
+ def regenerate_secondary_key_with_http_info(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
462
+ regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:custom_headers).value!
463
+ end
464
+
465
+ #
466
+ # Regenerates the secondary policy key of the specified authorization policy.
467
+ #
468
+ # @param resource_group_name [String] The name of the resource group.
469
+ # @param hub_name [String] The name of the hub.
470
+ # @param authorization_policy_name [String] The name of the policy.
471
+ # @param [Hash{String => String}] A hash of custom headers that will be added
472
+ # to the HTTP request.
473
+ #
474
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
475
+ #
476
+ def regenerate_secondary_key_async(resource_group_name, hub_name, authorization_policy_name, custom_headers:nil)
477
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
478
+ fail ArgumentError, 'hub_name is nil' if hub_name.nil?
479
+ fail ArgumentError, 'authorization_policy_name is nil' if authorization_policy_name.nil?
480
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
481
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
482
+
483
+
484
+ request_headers = {}
485
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
486
+
487
+ # Set Headers
488
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
489
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
490
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/authorizationPolicies/{authorizationPolicyName}/regenerateSecondaryKey'
491
+
492
+ request_url = @base_url || @client.base_url
493
+
494
+ options = {
495
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
496
+ path_params: {'resourceGroupName' => resource_group_name,'hubName' => hub_name,'authorizationPolicyName' => authorization_policy_name,'subscriptionId' => @client.subscription_id},
497
+ query_params: {'api-version' => @client.api_version},
498
+ headers: request_headers.merge(custom_headers || {}),
499
+ base_url: request_url
500
+ }
501
+ promise = @client.make_request_async(:post, path_template, options)
502
+
503
+ promise = promise.then do |result|
504
+ http_response = result.response
505
+ status_code = http_response.status
506
+ response_content = http_response.body
507
+ unless status_code == 200
508
+ error_model = JSON.load(response_content)
509
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
510
+ end
511
+
512
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
513
+ # Deserialize Response
514
+ if status_code == 200
515
+ begin
516
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
517
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicy.mapper()
518
+ result.body = @client.deserialize(result_mapper, parsed_response)
519
+ rescue Exception => e
520
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
521
+ end
522
+ end
523
+
524
+ result
525
+ end
526
+
527
+ promise.execute
528
+ end
529
+
530
+ #
531
+ # Gets all the authorization policies in a specified hub.
532
+ #
533
+ # @param next_page_link [String] The NextLink from the previous successful call
534
+ # to List operation.
535
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
536
+ # will be added to the HTTP request.
537
+ #
538
+ # @return [AuthorizationPolicyListResult] operation results.
539
+ #
540
+ def list_by_hub_next(next_page_link, custom_headers:nil)
541
+ response = list_by_hub_next_async(next_page_link, custom_headers:custom_headers).value!
542
+ response.body unless response.nil?
543
+ end
544
+
545
+ #
546
+ # Gets all the authorization policies in a specified hub.
547
+ #
548
+ # @param next_page_link [String] The NextLink from the previous successful call
549
+ # to List operation.
550
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
551
+ # will be added to the HTTP request.
552
+ #
553
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
554
+ #
555
+ def list_by_hub_next_with_http_info(next_page_link, custom_headers:nil)
556
+ list_by_hub_next_async(next_page_link, custom_headers:custom_headers).value!
557
+ end
558
+
559
+ #
560
+ # Gets all the authorization policies in a specified hub.
561
+ #
562
+ # @param next_page_link [String] The NextLink from the previous successful call
563
+ # to List operation.
564
+ # @param [Hash{String => String}] A hash of custom headers that will be added
565
+ # to the HTTP request.
566
+ #
567
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
568
+ #
569
+ def list_by_hub_next_async(next_page_link, custom_headers:nil)
570
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
571
+
572
+
573
+ request_headers = {}
574
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
575
+
576
+ # Set Headers
577
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
578
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
579
+ path_template = '{nextLink}'
580
+
581
+ request_url = @base_url || @client.base_url
582
+
583
+ options = {
584
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
585
+ skip_encoding_path_params: {'nextLink' => next_page_link},
586
+ headers: request_headers.merge(custom_headers || {}),
587
+ base_url: request_url
588
+ }
589
+ promise = @client.make_request_async(:get, path_template, options)
590
+
591
+ promise = promise.then do |result|
592
+ http_response = result.response
593
+ status_code = http_response.status
594
+ response_content = http_response.body
595
+ unless status_code == 200
596
+ error_model = JSON.load(response_content)
597
+ fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
598
+ end
599
+
600
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
601
+ # Deserialize Response
602
+ if status_code == 200
603
+ begin
604
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
605
+ result_mapper = Azure::CustomerInsights::Mgmt::V2017_01_01::Models::AuthorizationPolicyListResult.mapper()
606
+ result.body = @client.deserialize(result_mapper, parsed_response)
607
+ rescue Exception => e
608
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
609
+ end
610
+ end
611
+
612
+ result
613
+ end
614
+
615
+ promise.execute
616
+ end
617
+
618
+ #
619
+ # Gets all the authorization policies in a specified hub.
620
+ #
621
+ # @param resource_group_name [String] The name of the resource group.
622
+ # @param hub_name [String] The name of the hub.
623
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
624
+ # will be added to the HTTP request.
625
+ #
626
+ # @return [AuthorizationPolicyListResult] which provide lazy access to pages of
627
+ # the response.
628
+ #
629
+ def list_by_hub_as_lazy(resource_group_name, hub_name, custom_headers:nil)
630
+ response = list_by_hub_async(resource_group_name, hub_name, custom_headers:custom_headers).value!
631
+ unless response.nil?
632
+ page = response.body
633
+ page.next_method = Proc.new do |next_page_link|
634
+ list_by_hub_next_async(next_page_link, custom_headers:custom_headers)
635
+ end
636
+ page
637
+ end
638
+ end
639
+
640
+ end
641
+ end