azure_mgmt_mobile_engagement 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +3 -0
- data/LICENSE.txt +21 -0
- data/Rakefile +5 -0
- data/azure_mgmt_mobile_engagement.gemspec +34 -0
- data/lib/azure_mgmt_mobile_engagement.rb +5 -0
- data/lib/generated/azure_mgmt_mobile_engagement.rb +122 -0
- data/lib/generated/azure_mgmt_mobile_engagement/app_collections.rb +321 -0
- data/lib/generated/azure_mgmt_mobile_engagement/apps.rb +223 -0
- data/lib/generated/azure_mgmt_mobile_engagement/campaigns.rb +1591 -0
- data/lib/generated/azure_mgmt_mobile_engagement/devices.rb +798 -0
- data/lib/generated/azure_mgmt_mobile_engagement/engagement_management_client.rb +101 -0
- data/lib/generated/azure_mgmt_mobile_engagement/export_tasks.rb +1406 -0
- data/lib/generated/azure_mgmt_mobile_engagement/import_tasks.rb +501 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/announcement_feedback_criterion.rb +70 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/api_error.rb +45 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/api_error_error.rb +54 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app.rb +109 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app_collection.rb +90 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_list_result.rb +96 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app_collection_name_availability.rb +64 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app_info_filter.rb +68 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/app_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/application_version_criterion.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/audience_operators.rb +19 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/boolean_tag_criterion.rb +68 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign.rb +420 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_audience.rb +92 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_feedbacks.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_kinds.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_list_result.rb +121 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_localization.rb +169 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_parameters.rb +75 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_push_result.rb +57 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_result.rb +338 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state.rb +46 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_state_result.rb +51 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_states.rb +19 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_statistics_result.rb +233 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_new_parameters.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_test_saved_parameters.rb +56 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_type.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaign_types.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/campaigns_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/carrier_country_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/carrier_name_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/criterion.rb +64 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/datapush_feedback_criterion.rb +71 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/date_range_export_task_parameter.rb +88 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/date_tag_criterion.rb +83 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/delivery_times.rb +17 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device.rb +96 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_info.rb +175 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_location.rb +66 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_manufacturer_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_meta.rb +96 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_model_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_query_result.rb +73 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_parameters.rb +73 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/device_tags_result.rb +55 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/devices_query_result.rb +94 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/engage_active_users_filter.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/engage_idle_users_filter.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/engage_new_users_filter.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/engage_old_users_filter.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/engage_subset_filter.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_format.rb +16 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_options.rb +44 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_state.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_task_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_task_parameter.rb +66 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_task_result.rb +109 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/export_type.rb +23 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_campaign_parameter.rb +98 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/feedback_by_date_range_parameter.rb +100 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/filter.rb +52 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/firmware_version_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/geo_fencing_criterion.rb +93 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/import_task.rb +45 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/import_task_list_result.rb +95 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/import_task_result.rb +98 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/integer_tag_criterion.rb +81 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/job_states.rb +18 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/language_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/location_criterion.rb +81 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/native_push_enabled_filter.rb +48 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/network_type_criterion.rb +58 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/notification_options.rb +106 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/notification_types.rb +16 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_answer_feedback_criterion.rb +68 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_feedback_criterion.rb +69 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_question.rb +95 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice.rb +89 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_choice_localization.rb +47 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/poll_question_localization.rb +47 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/provisioning_states.rb +16 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/push_modes.rb +17 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/push_quota_filter.rb +48 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/screen_size_criterion.rb +59 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/segment_criterion.rb +69 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/string_tag_criterion.rb +69 -0
- data/lib/generated/azure_mgmt_mobile_engagement/models/supported_platforms_list_result.rb +51 -0
- data/lib/generated/azure_mgmt_mobile_engagement/module_definition.rb +8 -0
- data/lib/generated/azure_mgmt_mobile_engagement/supported_platforms.rb +112 -0
- data/lib/generated/azure_mgmt_mobile_engagement/version.rb +8 -0
- metadata +218 -0
@@ -0,0 +1,101 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::MobileEngagement
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class EngagementManagementClient < MsRestAzure::AzureServiceClient
|
11
|
+
include MsRestAzure
|
12
|
+
include MsRestAzure::Serialization
|
13
|
+
|
14
|
+
# @return [String] the base URI of the service.
|
15
|
+
attr_accessor :base_url
|
16
|
+
|
17
|
+
# @return Credentials needed for the client to connect to Azure.
|
18
|
+
attr_reader :credentials
|
19
|
+
|
20
|
+
# @return [String] Gets subscription credentials which uniquely identify
|
21
|
+
# Microsoft Azure subscription. The subscription ID forms part of the URI
|
22
|
+
# for every service call.
|
23
|
+
attr_accessor :subscription_id
|
24
|
+
|
25
|
+
# @return [String] Client Api Version.
|
26
|
+
attr_reader :api_version
|
27
|
+
|
28
|
+
# @return [String] The name of the resource group.
|
29
|
+
attr_accessor :resource_group_name
|
30
|
+
|
31
|
+
# @return [String] Application collection.
|
32
|
+
attr_accessor :app_collection
|
33
|
+
|
34
|
+
# @return [String] Application resource name.
|
35
|
+
attr_accessor :app_name
|
36
|
+
|
37
|
+
# @return [String] Gets or sets the preferred language for the response.
|
38
|
+
attr_accessor :accept_language
|
39
|
+
|
40
|
+
# @return [Integer] Gets or sets the retry timeout in seconds for Long
|
41
|
+
# Running Operations. Default value is 30.
|
42
|
+
attr_accessor :long_running_operation_retry_timeout
|
43
|
+
|
44
|
+
# @return [Boolean] When set to true a unique x-ms-client-request-id value
|
45
|
+
# is generated and included in each request. Default is true.
|
46
|
+
attr_accessor :generate_client_request_id
|
47
|
+
|
48
|
+
# @return Subscription credentials which uniquely identify client
|
49
|
+
# subscription.
|
50
|
+
attr_accessor :credentials
|
51
|
+
|
52
|
+
# @return [AppCollections] app_collections
|
53
|
+
attr_reader :app_collections
|
54
|
+
|
55
|
+
# @return [Apps] apps
|
56
|
+
attr_reader :apps
|
57
|
+
|
58
|
+
# @return [SupportedPlatforms] supported_platforms
|
59
|
+
attr_reader :supported_platforms
|
60
|
+
|
61
|
+
# @return [Campaigns] campaigns
|
62
|
+
attr_reader :campaigns
|
63
|
+
|
64
|
+
# @return [Devices] devices
|
65
|
+
attr_reader :devices
|
66
|
+
|
67
|
+
# @return [ExportTasks] export_tasks
|
68
|
+
attr_reader :export_tasks
|
69
|
+
|
70
|
+
# @return [ImportTasks] import_tasks
|
71
|
+
attr_reader :import_tasks
|
72
|
+
|
73
|
+
#
|
74
|
+
# Creates initializes a new instance of the EngagementManagementClient class.
|
75
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
76
|
+
# @param base_url [String] the base URI of the service.
|
77
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
78
|
+
#
|
79
|
+
def initialize(credentials, base_url = nil, options = nil)
|
80
|
+
super(credentials, options)
|
81
|
+
@base_url = base_url || 'https://management.azure.com'
|
82
|
+
|
83
|
+
fail ArgumentError, 'credentials is nil' if credentials.nil?
|
84
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
|
85
|
+
@credentials = credentials
|
86
|
+
|
87
|
+
@app_collections = AppCollections.new(self)
|
88
|
+
@apps = Apps.new(self)
|
89
|
+
@supported_platforms = SupportedPlatforms.new(self)
|
90
|
+
@campaigns = Campaigns.new(self)
|
91
|
+
@devices = Devices.new(self)
|
92
|
+
@export_tasks = ExportTasks.new(self)
|
93
|
+
@import_tasks = ImportTasks.new(self)
|
94
|
+
@api_version = '2014-12-01'
|
95
|
+
@accept_language = 'en-US'
|
96
|
+
@long_running_operation_retry_timeout = 30
|
97
|
+
@generate_client_request_id = true
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
end
|
@@ -0,0 +1,1406 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::ARM::MobileEngagement
|
7
|
+
#
|
8
|
+
# Microsoft Azure Mobile Engagement REST APIs.
|
9
|
+
#
|
10
|
+
class ExportTasks
|
11
|
+
include Azure::ARM::MobileEngagement::Models
|
12
|
+
include MsRestAzure
|
13
|
+
|
14
|
+
#
|
15
|
+
# Creates and initializes a new instance of the ExportTasks class.
|
16
|
+
# @param client service class for accessing basic functionality.
|
17
|
+
#
|
18
|
+
def initialize(client)
|
19
|
+
@client = client
|
20
|
+
end
|
21
|
+
|
22
|
+
# @return [EngagementManagementClient] reference to the EngagementManagementClient
|
23
|
+
attr_reader :client
|
24
|
+
|
25
|
+
#
|
26
|
+
# Get the list of export tasks.
|
27
|
+
#
|
28
|
+
# @param skip [Integer] Control paging of export tasks, start results at the
|
29
|
+
# given offset, defaults to 0 (1st page of data).
|
30
|
+
# @param top [Integer] Control paging of export tasks, number of export tasks
|
31
|
+
# to return with each call. By default, it returns all export tasks with a
|
32
|
+
# default paging of 20.
|
33
|
+
# The response contains a `nextLink` property describing the path to get the
|
34
|
+
# next page if there are more results.
|
35
|
+
# The maximum paging limit for $top is 40.
|
36
|
+
# @param orderby [String] Sort results by an expression which looks like
|
37
|
+
# `$orderby=taskId asc` (default when not specified).
|
38
|
+
# The syntax is orderby={property} {direction} or just orderby={property}.
|
39
|
+
# Properties that can be specified for sorting: taskId, errorDetails,
|
40
|
+
# dateCreated, taskStatus, and dateCreated.
|
41
|
+
# The available directions are asc (for ascending order) and desc (for
|
42
|
+
# descending order).
|
43
|
+
# When not specified the asc direction is used.
|
44
|
+
# Only one orderby property can be specified.
|
45
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
46
|
+
# will be added to the HTTP request.
|
47
|
+
#
|
48
|
+
# @return [ExportTaskListResult] which provide lazy access to pages of the
|
49
|
+
# response.
|
50
|
+
#
|
51
|
+
def list_as_lazy(skip = 0, top = 20, orderby = nil, custom_headers = nil)
|
52
|
+
response = list_async(skip, top, orderby, custom_headers).value!
|
53
|
+
unless response.nil?
|
54
|
+
page = response.body
|
55
|
+
page.next_method = Proc.new do |next_link|
|
56
|
+
list_next_async(next_link, custom_headers)
|
57
|
+
end
|
58
|
+
page
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Get the list of export tasks.
|
64
|
+
#
|
65
|
+
# @param skip [Integer] Control paging of export tasks, start results at the
|
66
|
+
# given offset, defaults to 0 (1st page of data).
|
67
|
+
# @param top [Integer] Control paging of export tasks, number of export tasks
|
68
|
+
# to return with each call. By default, it returns all export tasks with a
|
69
|
+
# default paging of 20.
|
70
|
+
# The response contains a `nextLink` property describing the path to get the
|
71
|
+
# next page if there are more results.
|
72
|
+
# The maximum paging limit for $top is 40.
|
73
|
+
# @param orderby [String] Sort results by an expression which looks like
|
74
|
+
# `$orderby=taskId asc` (default when not specified).
|
75
|
+
# The syntax is orderby={property} {direction} or just orderby={property}.
|
76
|
+
# Properties that can be specified for sorting: taskId, errorDetails,
|
77
|
+
# dateCreated, taskStatus, and dateCreated.
|
78
|
+
# The available directions are asc (for ascending order) and desc (for
|
79
|
+
# descending order).
|
80
|
+
# When not specified the asc direction is used.
|
81
|
+
# Only one orderby property can be specified.
|
82
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
83
|
+
# will be added to the HTTP request.
|
84
|
+
#
|
85
|
+
# @return [Array<ExportTaskResult>] operation results.
|
86
|
+
#
|
87
|
+
def list(skip = 0, top = 20, orderby = nil, custom_headers = nil)
|
88
|
+
first_page = list_as_lazy(skip, top, orderby, custom_headers)
|
89
|
+
first_page.get_all_items
|
90
|
+
end
|
91
|
+
|
92
|
+
#
|
93
|
+
# Get the list of export tasks.
|
94
|
+
#
|
95
|
+
# @param skip [Integer] Control paging of export tasks, start results at the
|
96
|
+
# given offset, defaults to 0 (1st page of data).
|
97
|
+
# @param top [Integer] Control paging of export tasks, number of export tasks
|
98
|
+
# to return with each call. By default, it returns all export tasks with a
|
99
|
+
# default paging of 20.
|
100
|
+
# The response contains a `nextLink` property describing the path to get the
|
101
|
+
# next page if there are more results.
|
102
|
+
# The maximum paging limit for $top is 40.
|
103
|
+
# @param orderby [String] Sort results by an expression which looks like
|
104
|
+
# `$orderby=taskId asc` (default when not specified).
|
105
|
+
# The syntax is orderby={property} {direction} or just orderby={property}.
|
106
|
+
# Properties that can be specified for sorting: taskId, errorDetails,
|
107
|
+
# dateCreated, taskStatus, and dateCreated.
|
108
|
+
# The available directions are asc (for ascending order) and desc (for
|
109
|
+
# descending order).
|
110
|
+
# When not specified the asc direction is used.
|
111
|
+
# Only one orderby property can be specified.
|
112
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
113
|
+
# will be added to the HTTP request.
|
114
|
+
#
|
115
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
116
|
+
#
|
117
|
+
def list_with_http_info(skip = 0, top = 20, orderby = nil, custom_headers = nil)
|
118
|
+
list_async(skip, top, orderby, custom_headers).value!
|
119
|
+
end
|
120
|
+
|
121
|
+
#
|
122
|
+
# Get the list of export tasks.
|
123
|
+
#
|
124
|
+
# @param skip [Integer] Control paging of export tasks, start results at the
|
125
|
+
# given offset, defaults to 0 (1st page of data).
|
126
|
+
# @param top [Integer] Control paging of export tasks, number of export tasks
|
127
|
+
# to return with each call. By default, it returns all export tasks with a
|
128
|
+
# default paging of 20.
|
129
|
+
# The response contains a `nextLink` property describing the path to get the
|
130
|
+
# next page if there are more results.
|
131
|
+
# The maximum paging limit for $top is 40.
|
132
|
+
# @param orderby [String] Sort results by an expression which looks like
|
133
|
+
# `$orderby=taskId asc` (default when not specified).
|
134
|
+
# The syntax is orderby={property} {direction} or just orderby={property}.
|
135
|
+
# Properties that can be specified for sorting: taskId, errorDetails,
|
136
|
+
# dateCreated, taskStatus, and dateCreated.
|
137
|
+
# The available directions are asc (for ascending order) and desc (for
|
138
|
+
# descending order).
|
139
|
+
# When not specified the asc direction is used.
|
140
|
+
# Only one orderby property can be specified.
|
141
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
142
|
+
# to the HTTP request.
|
143
|
+
#
|
144
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
145
|
+
#
|
146
|
+
def list_async(skip = 0, top = 20, orderby = nil, custom_headers = nil)
|
147
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
148
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
149
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
150
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
151
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
152
|
+
|
153
|
+
|
154
|
+
request_headers = {}
|
155
|
+
|
156
|
+
# Set Headers
|
157
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
158
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
159
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks'
|
160
|
+
options = {
|
161
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
162
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
163
|
+
query_params: {'api-version' => @client.api_version,'$skip' => skip,'$top' => top,'$orderby' => orderby},
|
164
|
+
headers: request_headers.merge(custom_headers || {})
|
165
|
+
}
|
166
|
+
|
167
|
+
request_url = @base_url || @client.base_url
|
168
|
+
|
169
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
170
|
+
promise = request.run_promise do |req|
|
171
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
172
|
+
end
|
173
|
+
|
174
|
+
promise = promise.then do |http_response|
|
175
|
+
status_code = http_response.status
|
176
|
+
response_content = http_response.body
|
177
|
+
unless status_code == 200
|
178
|
+
error_model = JSON.load(response_content)
|
179
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Create Result
|
183
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
184
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
185
|
+
# Deserialize Response
|
186
|
+
if status_code == 200
|
187
|
+
begin
|
188
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
189
|
+
result_mapper = ExportTaskListResult.mapper()
|
190
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
191
|
+
rescue Exception => e
|
192
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
result
|
197
|
+
end
|
198
|
+
|
199
|
+
promise.execute
|
200
|
+
end
|
201
|
+
|
202
|
+
#
|
203
|
+
# Retrieves information about a previously created export task.
|
204
|
+
#
|
205
|
+
# @param id [String] Export task identifier.
|
206
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
207
|
+
# will be added to the HTTP request.
|
208
|
+
#
|
209
|
+
# @return [ExportTaskResult] operation results.
|
210
|
+
#
|
211
|
+
def get(id, custom_headers = nil)
|
212
|
+
response = get_async(id, custom_headers).value!
|
213
|
+
response.body unless response.nil?
|
214
|
+
end
|
215
|
+
|
216
|
+
#
|
217
|
+
# Retrieves information about a previously created export task.
|
218
|
+
#
|
219
|
+
# @param id [String] Export task identifier.
|
220
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
221
|
+
# will be added to the HTTP request.
|
222
|
+
#
|
223
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
224
|
+
#
|
225
|
+
def get_with_http_info(id, custom_headers = nil)
|
226
|
+
get_async(id, custom_headers).value!
|
227
|
+
end
|
228
|
+
|
229
|
+
#
|
230
|
+
# Retrieves information about a previously created export task.
|
231
|
+
#
|
232
|
+
# @param id [String] Export task identifier.
|
233
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
234
|
+
# to the HTTP request.
|
235
|
+
#
|
236
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
237
|
+
#
|
238
|
+
def get_async(id, custom_headers = nil)
|
239
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
240
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
241
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
242
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
243
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
244
|
+
fail ArgumentError, 'id is nil' if id.nil?
|
245
|
+
|
246
|
+
|
247
|
+
request_headers = {}
|
248
|
+
|
249
|
+
# Set Headers
|
250
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
251
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
252
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/{id}'
|
253
|
+
options = {
|
254
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
255
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name,'id' => id},
|
256
|
+
query_params: {'api-version' => @client.api_version},
|
257
|
+
headers: request_headers.merge(custom_headers || {})
|
258
|
+
}
|
259
|
+
|
260
|
+
request_url = @base_url || @client.base_url
|
261
|
+
|
262
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
263
|
+
promise = request.run_promise do |req|
|
264
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
265
|
+
end
|
266
|
+
|
267
|
+
promise = promise.then do |http_response|
|
268
|
+
status_code = http_response.status
|
269
|
+
response_content = http_response.body
|
270
|
+
unless status_code == 200
|
271
|
+
error_model = JSON.load(response_content)
|
272
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
273
|
+
end
|
274
|
+
|
275
|
+
# Create Result
|
276
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
277
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
278
|
+
# Deserialize Response
|
279
|
+
if status_code == 200
|
280
|
+
begin
|
281
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
282
|
+
result_mapper = ExportTaskResult.mapper()
|
283
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
284
|
+
rescue Exception => e
|
285
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
result
|
290
|
+
end
|
291
|
+
|
292
|
+
promise.execute
|
293
|
+
end
|
294
|
+
|
295
|
+
#
|
296
|
+
# Creates a task to export activities.
|
297
|
+
#
|
298
|
+
# @param parameters [DateRangeExportTaskParameter]
|
299
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
300
|
+
# will be added to the HTTP request.
|
301
|
+
#
|
302
|
+
# @return [ExportTaskResult] operation results.
|
303
|
+
#
|
304
|
+
def create_activities_task(parameters, custom_headers = nil)
|
305
|
+
response = create_activities_task_async(parameters, custom_headers).value!
|
306
|
+
response.body unless response.nil?
|
307
|
+
end
|
308
|
+
|
309
|
+
#
|
310
|
+
# Creates a task to export activities.
|
311
|
+
#
|
312
|
+
# @param parameters [DateRangeExportTaskParameter]
|
313
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
314
|
+
# will be added to the HTTP request.
|
315
|
+
#
|
316
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
317
|
+
#
|
318
|
+
def create_activities_task_with_http_info(parameters, custom_headers = nil)
|
319
|
+
create_activities_task_async(parameters, custom_headers).value!
|
320
|
+
end
|
321
|
+
|
322
|
+
#
|
323
|
+
# Creates a task to export activities.
|
324
|
+
#
|
325
|
+
# @param parameters [DateRangeExportTaskParameter]
|
326
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
327
|
+
# to the HTTP request.
|
328
|
+
#
|
329
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
330
|
+
#
|
331
|
+
def create_activities_task_async(parameters, custom_headers = nil)
|
332
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
333
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
334
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
335
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
336
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
337
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
338
|
+
|
339
|
+
|
340
|
+
request_headers = {}
|
341
|
+
|
342
|
+
# Set Headers
|
343
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
344
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
345
|
+
|
346
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
347
|
+
|
348
|
+
# Serialize Request
|
349
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
350
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
351
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
352
|
+
|
353
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/activities'
|
354
|
+
options = {
|
355
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
356
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
357
|
+
query_params: {'api-version' => @client.api_version},
|
358
|
+
body: request_content,
|
359
|
+
headers: request_headers.merge(custom_headers || {})
|
360
|
+
}
|
361
|
+
|
362
|
+
request_url = @base_url || @client.base_url
|
363
|
+
|
364
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
365
|
+
promise = request.run_promise do |req|
|
366
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
367
|
+
end
|
368
|
+
|
369
|
+
promise = promise.then do |http_response|
|
370
|
+
status_code = http_response.status
|
371
|
+
response_content = http_response.body
|
372
|
+
unless status_code == 202
|
373
|
+
error_model = JSON.load(response_content)
|
374
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
375
|
+
end
|
376
|
+
|
377
|
+
# Create Result
|
378
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
379
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
380
|
+
# Deserialize Response
|
381
|
+
if status_code == 202
|
382
|
+
begin
|
383
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
384
|
+
result_mapper = ExportTaskResult.mapper()
|
385
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
386
|
+
rescue Exception => e
|
387
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
388
|
+
end
|
389
|
+
end
|
390
|
+
|
391
|
+
result
|
392
|
+
end
|
393
|
+
|
394
|
+
promise.execute
|
395
|
+
end
|
396
|
+
|
397
|
+
#
|
398
|
+
# Creates a task to export crashes.
|
399
|
+
#
|
400
|
+
# @param parameters [DateRangeExportTaskParameter]
|
401
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
402
|
+
# will be added to the HTTP request.
|
403
|
+
#
|
404
|
+
# @return [ExportTaskResult] operation results.
|
405
|
+
#
|
406
|
+
def create_crashes_task(parameters, custom_headers = nil)
|
407
|
+
response = create_crashes_task_async(parameters, custom_headers).value!
|
408
|
+
response.body unless response.nil?
|
409
|
+
end
|
410
|
+
|
411
|
+
#
|
412
|
+
# Creates a task to export crashes.
|
413
|
+
#
|
414
|
+
# @param parameters [DateRangeExportTaskParameter]
|
415
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
416
|
+
# will be added to the HTTP request.
|
417
|
+
#
|
418
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
419
|
+
#
|
420
|
+
def create_crashes_task_with_http_info(parameters, custom_headers = nil)
|
421
|
+
create_crashes_task_async(parameters, custom_headers).value!
|
422
|
+
end
|
423
|
+
|
424
|
+
#
|
425
|
+
# Creates a task to export crashes.
|
426
|
+
#
|
427
|
+
# @param parameters [DateRangeExportTaskParameter]
|
428
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
429
|
+
# to the HTTP request.
|
430
|
+
#
|
431
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
432
|
+
#
|
433
|
+
def create_crashes_task_async(parameters, custom_headers = nil)
|
434
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
435
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
436
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
437
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
438
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
439
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
440
|
+
|
441
|
+
|
442
|
+
request_headers = {}
|
443
|
+
|
444
|
+
# Set Headers
|
445
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
446
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
447
|
+
|
448
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
449
|
+
|
450
|
+
# Serialize Request
|
451
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
452
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
453
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
454
|
+
|
455
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/crashes'
|
456
|
+
options = {
|
457
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
458
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
459
|
+
query_params: {'api-version' => @client.api_version},
|
460
|
+
body: request_content,
|
461
|
+
headers: request_headers.merge(custom_headers || {})
|
462
|
+
}
|
463
|
+
|
464
|
+
request_url = @base_url || @client.base_url
|
465
|
+
|
466
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
467
|
+
promise = request.run_promise do |req|
|
468
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
469
|
+
end
|
470
|
+
|
471
|
+
promise = promise.then do |http_response|
|
472
|
+
status_code = http_response.status
|
473
|
+
response_content = http_response.body
|
474
|
+
unless status_code == 202
|
475
|
+
error_model = JSON.load(response_content)
|
476
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
477
|
+
end
|
478
|
+
|
479
|
+
# Create Result
|
480
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
481
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
482
|
+
# Deserialize Response
|
483
|
+
if status_code == 202
|
484
|
+
begin
|
485
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
486
|
+
result_mapper = ExportTaskResult.mapper()
|
487
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
488
|
+
rescue Exception => e
|
489
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
490
|
+
end
|
491
|
+
end
|
492
|
+
|
493
|
+
result
|
494
|
+
end
|
495
|
+
|
496
|
+
promise.execute
|
497
|
+
end
|
498
|
+
|
499
|
+
#
|
500
|
+
# Creates a task to export errors.
|
501
|
+
#
|
502
|
+
# @param parameters [DateRangeExportTaskParameter]
|
503
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
504
|
+
# will be added to the HTTP request.
|
505
|
+
#
|
506
|
+
# @return [ExportTaskResult] operation results.
|
507
|
+
#
|
508
|
+
def create_errors_task(parameters, custom_headers = nil)
|
509
|
+
response = create_errors_task_async(parameters, custom_headers).value!
|
510
|
+
response.body unless response.nil?
|
511
|
+
end
|
512
|
+
|
513
|
+
#
|
514
|
+
# Creates a task to export errors.
|
515
|
+
#
|
516
|
+
# @param parameters [DateRangeExportTaskParameter]
|
517
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
518
|
+
# will be added to the HTTP request.
|
519
|
+
#
|
520
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
521
|
+
#
|
522
|
+
def create_errors_task_with_http_info(parameters, custom_headers = nil)
|
523
|
+
create_errors_task_async(parameters, custom_headers).value!
|
524
|
+
end
|
525
|
+
|
526
|
+
#
|
527
|
+
# Creates a task to export errors.
|
528
|
+
#
|
529
|
+
# @param parameters [DateRangeExportTaskParameter]
|
530
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
531
|
+
# to the HTTP request.
|
532
|
+
#
|
533
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
534
|
+
#
|
535
|
+
def create_errors_task_async(parameters, custom_headers = nil)
|
536
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
537
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
538
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
539
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
540
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
541
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
542
|
+
|
543
|
+
|
544
|
+
request_headers = {}
|
545
|
+
|
546
|
+
# Set Headers
|
547
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
548
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
549
|
+
|
550
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
551
|
+
|
552
|
+
# Serialize Request
|
553
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
554
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
555
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
556
|
+
|
557
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/errors'
|
558
|
+
options = {
|
559
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
560
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
561
|
+
query_params: {'api-version' => @client.api_version},
|
562
|
+
body: request_content,
|
563
|
+
headers: request_headers.merge(custom_headers || {})
|
564
|
+
}
|
565
|
+
|
566
|
+
request_url = @base_url || @client.base_url
|
567
|
+
|
568
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
569
|
+
promise = request.run_promise do |req|
|
570
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
571
|
+
end
|
572
|
+
|
573
|
+
promise = promise.then do |http_response|
|
574
|
+
status_code = http_response.status
|
575
|
+
response_content = http_response.body
|
576
|
+
unless status_code == 202
|
577
|
+
error_model = JSON.load(response_content)
|
578
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
579
|
+
end
|
580
|
+
|
581
|
+
# Create Result
|
582
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
583
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
584
|
+
# Deserialize Response
|
585
|
+
if status_code == 202
|
586
|
+
begin
|
587
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
588
|
+
result_mapper = ExportTaskResult.mapper()
|
589
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
590
|
+
rescue Exception => e
|
591
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
592
|
+
end
|
593
|
+
end
|
594
|
+
|
595
|
+
result
|
596
|
+
end
|
597
|
+
|
598
|
+
promise.execute
|
599
|
+
end
|
600
|
+
|
601
|
+
#
|
602
|
+
# Creates a task to export events.
|
603
|
+
#
|
604
|
+
# @param parameters [DateRangeExportTaskParameter]
|
605
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
606
|
+
# will be added to the HTTP request.
|
607
|
+
#
|
608
|
+
# @return [ExportTaskResult] operation results.
|
609
|
+
#
|
610
|
+
def create_events_task(parameters, custom_headers = nil)
|
611
|
+
response = create_events_task_async(parameters, custom_headers).value!
|
612
|
+
response.body unless response.nil?
|
613
|
+
end
|
614
|
+
|
615
|
+
#
|
616
|
+
# Creates a task to export events.
|
617
|
+
#
|
618
|
+
# @param parameters [DateRangeExportTaskParameter]
|
619
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
620
|
+
# will be added to the HTTP request.
|
621
|
+
#
|
622
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
623
|
+
#
|
624
|
+
def create_events_task_with_http_info(parameters, custom_headers = nil)
|
625
|
+
create_events_task_async(parameters, custom_headers).value!
|
626
|
+
end
|
627
|
+
|
628
|
+
#
|
629
|
+
# Creates a task to export events.
|
630
|
+
#
|
631
|
+
# @param parameters [DateRangeExportTaskParameter]
|
632
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
633
|
+
# to the HTTP request.
|
634
|
+
#
|
635
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
636
|
+
#
|
637
|
+
def create_events_task_async(parameters, custom_headers = nil)
|
638
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
639
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
640
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
641
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
642
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
643
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
644
|
+
|
645
|
+
|
646
|
+
request_headers = {}
|
647
|
+
|
648
|
+
# Set Headers
|
649
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
650
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
651
|
+
|
652
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
653
|
+
|
654
|
+
# Serialize Request
|
655
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
656
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
657
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
658
|
+
|
659
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/events'
|
660
|
+
options = {
|
661
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
662
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
663
|
+
query_params: {'api-version' => @client.api_version},
|
664
|
+
body: request_content,
|
665
|
+
headers: request_headers.merge(custom_headers || {})
|
666
|
+
}
|
667
|
+
|
668
|
+
request_url = @base_url || @client.base_url
|
669
|
+
|
670
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
671
|
+
promise = request.run_promise do |req|
|
672
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
673
|
+
end
|
674
|
+
|
675
|
+
promise = promise.then do |http_response|
|
676
|
+
status_code = http_response.status
|
677
|
+
response_content = http_response.body
|
678
|
+
unless status_code == 202
|
679
|
+
error_model = JSON.load(response_content)
|
680
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
681
|
+
end
|
682
|
+
|
683
|
+
# Create Result
|
684
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
685
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
686
|
+
# Deserialize Response
|
687
|
+
if status_code == 202
|
688
|
+
begin
|
689
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
690
|
+
result_mapper = ExportTaskResult.mapper()
|
691
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
692
|
+
rescue Exception => e
|
693
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
694
|
+
end
|
695
|
+
end
|
696
|
+
|
697
|
+
result
|
698
|
+
end
|
699
|
+
|
700
|
+
promise.execute
|
701
|
+
end
|
702
|
+
|
703
|
+
#
|
704
|
+
# Creates a task to export jobs.
|
705
|
+
#
|
706
|
+
# @param parameters [DateRangeExportTaskParameter]
|
707
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
708
|
+
# will be added to the HTTP request.
|
709
|
+
#
|
710
|
+
# @return [ExportTaskResult] operation results.
|
711
|
+
#
|
712
|
+
def create_jobs_task(parameters, custom_headers = nil)
|
713
|
+
response = create_jobs_task_async(parameters, custom_headers).value!
|
714
|
+
response.body unless response.nil?
|
715
|
+
end
|
716
|
+
|
717
|
+
#
|
718
|
+
# Creates a task to export jobs.
|
719
|
+
#
|
720
|
+
# @param parameters [DateRangeExportTaskParameter]
|
721
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
722
|
+
# will be added to the HTTP request.
|
723
|
+
#
|
724
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
725
|
+
#
|
726
|
+
def create_jobs_task_with_http_info(parameters, custom_headers = nil)
|
727
|
+
create_jobs_task_async(parameters, custom_headers).value!
|
728
|
+
end
|
729
|
+
|
730
|
+
#
|
731
|
+
# Creates a task to export jobs.
|
732
|
+
#
|
733
|
+
# @param parameters [DateRangeExportTaskParameter]
|
734
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
735
|
+
# to the HTTP request.
|
736
|
+
#
|
737
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
738
|
+
#
|
739
|
+
def create_jobs_task_async(parameters, custom_headers = nil)
|
740
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
741
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
742
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
743
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
744
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
745
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
746
|
+
|
747
|
+
|
748
|
+
request_headers = {}
|
749
|
+
|
750
|
+
# Set Headers
|
751
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
752
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
753
|
+
|
754
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
755
|
+
|
756
|
+
# Serialize Request
|
757
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
758
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
759
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
760
|
+
|
761
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/jobs'
|
762
|
+
options = {
|
763
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
764
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
765
|
+
query_params: {'api-version' => @client.api_version},
|
766
|
+
body: request_content,
|
767
|
+
headers: request_headers.merge(custom_headers || {})
|
768
|
+
}
|
769
|
+
|
770
|
+
request_url = @base_url || @client.base_url
|
771
|
+
|
772
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
773
|
+
promise = request.run_promise do |req|
|
774
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
775
|
+
end
|
776
|
+
|
777
|
+
promise = promise.then do |http_response|
|
778
|
+
status_code = http_response.status
|
779
|
+
response_content = http_response.body
|
780
|
+
unless status_code == 202
|
781
|
+
error_model = JSON.load(response_content)
|
782
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
783
|
+
end
|
784
|
+
|
785
|
+
# Create Result
|
786
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
787
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
788
|
+
# Deserialize Response
|
789
|
+
if status_code == 202
|
790
|
+
begin
|
791
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
792
|
+
result_mapper = ExportTaskResult.mapper()
|
793
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
794
|
+
rescue Exception => e
|
795
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
796
|
+
end
|
797
|
+
end
|
798
|
+
|
799
|
+
result
|
800
|
+
end
|
801
|
+
|
802
|
+
promise.execute
|
803
|
+
end
|
804
|
+
|
805
|
+
#
|
806
|
+
# Creates a task to export sessions.
|
807
|
+
#
|
808
|
+
# @param parameters [DateRangeExportTaskParameter]
|
809
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
810
|
+
# will be added to the HTTP request.
|
811
|
+
#
|
812
|
+
# @return [ExportTaskResult] operation results.
|
813
|
+
#
|
814
|
+
def create_sessions_task(parameters, custom_headers = nil)
|
815
|
+
response = create_sessions_task_async(parameters, custom_headers).value!
|
816
|
+
response.body unless response.nil?
|
817
|
+
end
|
818
|
+
|
819
|
+
#
|
820
|
+
# Creates a task to export sessions.
|
821
|
+
#
|
822
|
+
# @param parameters [DateRangeExportTaskParameter]
|
823
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
824
|
+
# will be added to the HTTP request.
|
825
|
+
#
|
826
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
827
|
+
#
|
828
|
+
def create_sessions_task_with_http_info(parameters, custom_headers = nil)
|
829
|
+
create_sessions_task_async(parameters, custom_headers).value!
|
830
|
+
end
|
831
|
+
|
832
|
+
#
|
833
|
+
# Creates a task to export sessions.
|
834
|
+
#
|
835
|
+
# @param parameters [DateRangeExportTaskParameter]
|
836
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
837
|
+
# to the HTTP request.
|
838
|
+
#
|
839
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
840
|
+
#
|
841
|
+
def create_sessions_task_async(parameters, custom_headers = nil)
|
842
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
843
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
844
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
845
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
846
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
847
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
848
|
+
|
849
|
+
|
850
|
+
request_headers = {}
|
851
|
+
|
852
|
+
# Set Headers
|
853
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
854
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
855
|
+
|
856
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
857
|
+
|
858
|
+
# Serialize Request
|
859
|
+
request_mapper = DateRangeExportTaskParameter.mapper()
|
860
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
861
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
862
|
+
|
863
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/sessions'
|
864
|
+
options = {
|
865
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
866
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
867
|
+
query_params: {'api-version' => @client.api_version},
|
868
|
+
body: request_content,
|
869
|
+
headers: request_headers.merge(custom_headers || {})
|
870
|
+
}
|
871
|
+
|
872
|
+
request_url = @base_url || @client.base_url
|
873
|
+
|
874
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
875
|
+
promise = request.run_promise do |req|
|
876
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
877
|
+
end
|
878
|
+
|
879
|
+
promise = promise.then do |http_response|
|
880
|
+
status_code = http_response.status
|
881
|
+
response_content = http_response.body
|
882
|
+
unless status_code == 202
|
883
|
+
error_model = JSON.load(response_content)
|
884
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
885
|
+
end
|
886
|
+
|
887
|
+
# Create Result
|
888
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
889
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
890
|
+
# Deserialize Response
|
891
|
+
if status_code == 202
|
892
|
+
begin
|
893
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
894
|
+
result_mapper = ExportTaskResult.mapper()
|
895
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
896
|
+
rescue Exception => e
|
897
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
898
|
+
end
|
899
|
+
end
|
900
|
+
|
901
|
+
result
|
902
|
+
end
|
903
|
+
|
904
|
+
promise.execute
|
905
|
+
end
|
906
|
+
|
907
|
+
#
|
908
|
+
# Creates a task to export tags.
|
909
|
+
#
|
910
|
+
# @param parameters [ExportTaskParameter]
|
911
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
912
|
+
# will be added to the HTTP request.
|
913
|
+
#
|
914
|
+
# @return [ExportTaskResult] operation results.
|
915
|
+
#
|
916
|
+
def create_tags_task(parameters, custom_headers = nil)
|
917
|
+
response = create_tags_task_async(parameters, custom_headers).value!
|
918
|
+
response.body unless response.nil?
|
919
|
+
end
|
920
|
+
|
921
|
+
#
|
922
|
+
# Creates a task to export tags.
|
923
|
+
#
|
924
|
+
# @param parameters [ExportTaskParameter]
|
925
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
926
|
+
# will be added to the HTTP request.
|
927
|
+
#
|
928
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
929
|
+
#
|
930
|
+
def create_tags_task_with_http_info(parameters, custom_headers = nil)
|
931
|
+
create_tags_task_async(parameters, custom_headers).value!
|
932
|
+
end
|
933
|
+
|
934
|
+
#
|
935
|
+
# Creates a task to export tags.
|
936
|
+
#
|
937
|
+
# @param parameters [ExportTaskParameter]
|
938
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
939
|
+
# to the HTTP request.
|
940
|
+
#
|
941
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
942
|
+
#
|
943
|
+
def create_tags_task_async(parameters, custom_headers = nil)
|
944
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
945
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
946
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
947
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
948
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
949
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
950
|
+
|
951
|
+
|
952
|
+
request_headers = {}
|
953
|
+
|
954
|
+
# Set Headers
|
955
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
956
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
957
|
+
|
958
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
959
|
+
|
960
|
+
# Serialize Request
|
961
|
+
request_mapper = ExportTaskParameter.mapper()
|
962
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
963
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
964
|
+
|
965
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/tags'
|
966
|
+
options = {
|
967
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
968
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
969
|
+
query_params: {'api-version' => @client.api_version},
|
970
|
+
body: request_content,
|
971
|
+
headers: request_headers.merge(custom_headers || {})
|
972
|
+
}
|
973
|
+
|
974
|
+
request_url = @base_url || @client.base_url
|
975
|
+
|
976
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
977
|
+
promise = request.run_promise do |req|
|
978
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
979
|
+
end
|
980
|
+
|
981
|
+
promise = promise.then do |http_response|
|
982
|
+
status_code = http_response.status
|
983
|
+
response_content = http_response.body
|
984
|
+
unless status_code == 202
|
985
|
+
error_model = JSON.load(response_content)
|
986
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
987
|
+
end
|
988
|
+
|
989
|
+
# Create Result
|
990
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
991
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
992
|
+
# Deserialize Response
|
993
|
+
if status_code == 202
|
994
|
+
begin
|
995
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
996
|
+
result_mapper = ExportTaskResult.mapper()
|
997
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
998
|
+
rescue Exception => e
|
999
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1000
|
+
end
|
1001
|
+
end
|
1002
|
+
|
1003
|
+
result
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
promise.execute
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
#
|
1010
|
+
# Creates a task to export tags.
|
1011
|
+
#
|
1012
|
+
# @param parameters [ExportTaskParameter]
|
1013
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1014
|
+
# will be added to the HTTP request.
|
1015
|
+
#
|
1016
|
+
# @return [ExportTaskResult] operation results.
|
1017
|
+
#
|
1018
|
+
def create_tokens_task(parameters, custom_headers = nil)
|
1019
|
+
response = create_tokens_task_async(parameters, custom_headers).value!
|
1020
|
+
response.body unless response.nil?
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
#
|
1024
|
+
# Creates a task to export tags.
|
1025
|
+
#
|
1026
|
+
# @param parameters [ExportTaskParameter]
|
1027
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1028
|
+
# will be added to the HTTP request.
|
1029
|
+
#
|
1030
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1031
|
+
#
|
1032
|
+
def create_tokens_task_with_http_info(parameters, custom_headers = nil)
|
1033
|
+
create_tokens_task_async(parameters, custom_headers).value!
|
1034
|
+
end
|
1035
|
+
|
1036
|
+
#
|
1037
|
+
# Creates a task to export tags.
|
1038
|
+
#
|
1039
|
+
# @param parameters [ExportTaskParameter]
|
1040
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1041
|
+
# to the HTTP request.
|
1042
|
+
#
|
1043
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1044
|
+
#
|
1045
|
+
def create_tokens_task_async(parameters, custom_headers = nil)
|
1046
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1047
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
1048
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
1049
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
1050
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1051
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1052
|
+
|
1053
|
+
|
1054
|
+
request_headers = {}
|
1055
|
+
|
1056
|
+
# Set Headers
|
1057
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1058
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1059
|
+
|
1060
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1061
|
+
|
1062
|
+
# Serialize Request
|
1063
|
+
request_mapper = ExportTaskParameter.mapper()
|
1064
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
1065
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1066
|
+
|
1067
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/tokens'
|
1068
|
+
options = {
|
1069
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1070
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
1071
|
+
query_params: {'api-version' => @client.api_version},
|
1072
|
+
body: request_content,
|
1073
|
+
headers: request_headers.merge(custom_headers || {})
|
1074
|
+
}
|
1075
|
+
|
1076
|
+
request_url = @base_url || @client.base_url
|
1077
|
+
|
1078
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
1079
|
+
promise = request.run_promise do |req|
|
1080
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
promise = promise.then do |http_response|
|
1084
|
+
status_code = http_response.status
|
1085
|
+
response_content = http_response.body
|
1086
|
+
unless status_code == 202
|
1087
|
+
error_model = JSON.load(response_content)
|
1088
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
1089
|
+
end
|
1090
|
+
|
1091
|
+
# Create Result
|
1092
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1093
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1094
|
+
# Deserialize Response
|
1095
|
+
if status_code == 202
|
1096
|
+
begin
|
1097
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1098
|
+
result_mapper = ExportTaskResult.mapper()
|
1099
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1100
|
+
rescue Exception => e
|
1101
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1102
|
+
end
|
1103
|
+
end
|
1104
|
+
|
1105
|
+
result
|
1106
|
+
end
|
1107
|
+
|
1108
|
+
promise.execute
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
#
|
1112
|
+
# Creates a task to export push campaign data for a date range.
|
1113
|
+
#
|
1114
|
+
# @param parameters [FeedbackByDateRangeParameter]
|
1115
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1116
|
+
# will be added to the HTTP request.
|
1117
|
+
#
|
1118
|
+
# @return [ExportTaskResult] operation results.
|
1119
|
+
#
|
1120
|
+
def create_feedback_task_by_date_range(parameters, custom_headers = nil)
|
1121
|
+
response = create_feedback_task_by_date_range_async(parameters, custom_headers).value!
|
1122
|
+
response.body unless response.nil?
|
1123
|
+
end
|
1124
|
+
|
1125
|
+
#
|
1126
|
+
# Creates a task to export push campaign data for a date range.
|
1127
|
+
#
|
1128
|
+
# @param parameters [FeedbackByDateRangeParameter]
|
1129
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1130
|
+
# will be added to the HTTP request.
|
1131
|
+
#
|
1132
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1133
|
+
#
|
1134
|
+
def create_feedback_task_by_date_range_with_http_info(parameters, custom_headers = nil)
|
1135
|
+
create_feedback_task_by_date_range_async(parameters, custom_headers).value!
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
#
|
1139
|
+
# Creates a task to export push campaign data for a date range.
|
1140
|
+
#
|
1141
|
+
# @param parameters [FeedbackByDateRangeParameter]
|
1142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1143
|
+
# to the HTTP request.
|
1144
|
+
#
|
1145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1146
|
+
#
|
1147
|
+
def create_feedback_task_by_date_range_async(parameters, custom_headers = nil)
|
1148
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1149
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
1150
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
1151
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
1152
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1153
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1154
|
+
|
1155
|
+
|
1156
|
+
request_headers = {}
|
1157
|
+
|
1158
|
+
# Set Headers
|
1159
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1160
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1161
|
+
|
1162
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1163
|
+
|
1164
|
+
# Serialize Request
|
1165
|
+
request_mapper = FeedbackByDateRangeParameter.mapper()
|
1166
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
1167
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1168
|
+
|
1169
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/feedbackByDate'
|
1170
|
+
options = {
|
1171
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1172
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
1173
|
+
query_params: {'api-version' => @client.api_version},
|
1174
|
+
body: request_content,
|
1175
|
+
headers: request_headers.merge(custom_headers || {})
|
1176
|
+
}
|
1177
|
+
|
1178
|
+
request_url = @base_url || @client.base_url
|
1179
|
+
|
1180
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
1181
|
+
promise = request.run_promise do |req|
|
1182
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1183
|
+
end
|
1184
|
+
|
1185
|
+
promise = promise.then do |http_response|
|
1186
|
+
status_code = http_response.status
|
1187
|
+
response_content = http_response.body
|
1188
|
+
unless status_code == 202
|
1189
|
+
error_model = JSON.load(response_content)
|
1190
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
# Create Result
|
1194
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1195
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1196
|
+
# Deserialize Response
|
1197
|
+
if status_code == 202
|
1198
|
+
begin
|
1199
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1200
|
+
result_mapper = ExportTaskResult.mapper()
|
1201
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1202
|
+
rescue Exception => e
|
1203
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1204
|
+
end
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
result
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
promise.execute
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
#
|
1214
|
+
# Creates a task to export push campaign data for a set of campaigns.
|
1215
|
+
#
|
1216
|
+
# @param parameters [FeedbackByCampaignParameter]
|
1217
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1218
|
+
# will be added to the HTTP request.
|
1219
|
+
#
|
1220
|
+
# @return [ExportTaskResult] operation results.
|
1221
|
+
#
|
1222
|
+
def create_feedback_task_by_campaign(parameters, custom_headers = nil)
|
1223
|
+
response = create_feedback_task_by_campaign_async(parameters, custom_headers).value!
|
1224
|
+
response.body unless response.nil?
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
#
|
1228
|
+
# Creates a task to export push campaign data for a set of campaigns.
|
1229
|
+
#
|
1230
|
+
# @param parameters [FeedbackByCampaignParameter]
|
1231
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1232
|
+
# will be added to the HTTP request.
|
1233
|
+
#
|
1234
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1235
|
+
#
|
1236
|
+
def create_feedback_task_by_campaign_with_http_info(parameters, custom_headers = nil)
|
1237
|
+
create_feedback_task_by_campaign_async(parameters, custom_headers).value!
|
1238
|
+
end
|
1239
|
+
|
1240
|
+
#
|
1241
|
+
# Creates a task to export push campaign data for a set of campaigns.
|
1242
|
+
#
|
1243
|
+
# @param parameters [FeedbackByCampaignParameter]
|
1244
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1245
|
+
# to the HTTP request.
|
1246
|
+
#
|
1247
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1248
|
+
#
|
1249
|
+
def create_feedback_task_by_campaign_async(parameters, custom_headers = nil)
|
1250
|
+
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
|
1251
|
+
fail ArgumentError, '@client.resource_group_name is nil' if @client.resource_group_name.nil?
|
1252
|
+
fail ArgumentError, '@client.app_collection is nil' if @client.app_collection.nil?
|
1253
|
+
fail ArgumentError, '@client.app_name is nil' if @client.app_name.nil?
|
1254
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
1255
|
+
fail ArgumentError, 'parameters is nil' if parameters.nil?
|
1256
|
+
|
1257
|
+
|
1258
|
+
request_headers = {}
|
1259
|
+
|
1260
|
+
# Set Headers
|
1261
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1262
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1263
|
+
|
1264
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
1265
|
+
|
1266
|
+
# Serialize Request
|
1267
|
+
request_mapper = FeedbackByCampaignParameter.mapper()
|
1268
|
+
request_content = @client.serialize(request_mapper, parameters, 'parameters')
|
1269
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
1270
|
+
|
1271
|
+
path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileEngagement/appcollections/{appCollection}/apps/{appName}/devices/exportTasks/feedbackByCampaign'
|
1272
|
+
options = {
|
1273
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1274
|
+
path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => @client.resource_group_name,'appCollection' => @client.app_collection,'appName' => @client.app_name},
|
1275
|
+
query_params: {'api-version' => @client.api_version},
|
1276
|
+
body: request_content,
|
1277
|
+
headers: request_headers.merge(custom_headers || {})
|
1278
|
+
}
|
1279
|
+
|
1280
|
+
request_url = @base_url || @client.base_url
|
1281
|
+
|
1282
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
|
1283
|
+
promise = request.run_promise do |req|
|
1284
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1285
|
+
end
|
1286
|
+
|
1287
|
+
promise = promise.then do |http_response|
|
1288
|
+
status_code = http_response.status
|
1289
|
+
response_content = http_response.body
|
1290
|
+
unless status_code == 202
|
1291
|
+
error_model = JSON.load(response_content)
|
1292
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
1293
|
+
end
|
1294
|
+
|
1295
|
+
# Create Result
|
1296
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1297
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1298
|
+
# Deserialize Response
|
1299
|
+
if status_code == 202
|
1300
|
+
begin
|
1301
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1302
|
+
result_mapper = ExportTaskResult.mapper()
|
1303
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1304
|
+
rescue Exception => e
|
1305
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1306
|
+
end
|
1307
|
+
end
|
1308
|
+
|
1309
|
+
result
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
promise.execute
|
1313
|
+
end
|
1314
|
+
|
1315
|
+
#
|
1316
|
+
# Get the list of export tasks.
|
1317
|
+
#
|
1318
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1319
|
+
# call to List operation.
|
1320
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1321
|
+
# will be added to the HTTP request.
|
1322
|
+
#
|
1323
|
+
# @return [ExportTaskListResult] operation results.
|
1324
|
+
#
|
1325
|
+
def list_next(next_page_link, custom_headers = nil)
|
1326
|
+
response = list_next_async(next_page_link, custom_headers).value!
|
1327
|
+
response.body unless response.nil?
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
#
|
1331
|
+
# Get the list of export tasks.
|
1332
|
+
#
|
1333
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1334
|
+
# call to List operation.
|
1335
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
1336
|
+
# will be added to the HTTP request.
|
1337
|
+
#
|
1338
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
1339
|
+
#
|
1340
|
+
def list_next_with_http_info(next_page_link, custom_headers = nil)
|
1341
|
+
list_next_async(next_page_link, custom_headers).value!
|
1342
|
+
end
|
1343
|
+
|
1344
|
+
#
|
1345
|
+
# Get the list of export tasks.
|
1346
|
+
#
|
1347
|
+
# @param next_page_link [String] The NextLink from the previous successful
|
1348
|
+
# call to List operation.
|
1349
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
1350
|
+
# to the HTTP request.
|
1351
|
+
#
|
1352
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
1353
|
+
#
|
1354
|
+
def list_next_async(next_page_link, custom_headers = nil)
|
1355
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
1356
|
+
|
1357
|
+
|
1358
|
+
request_headers = {}
|
1359
|
+
|
1360
|
+
# Set Headers
|
1361
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
1362
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
1363
|
+
path_template = '{nextLink}'
|
1364
|
+
options = {
|
1365
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
1366
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
1367
|
+
headers: request_headers.merge(custom_headers || {})
|
1368
|
+
}
|
1369
|
+
|
1370
|
+
request_url = @base_url || @client.base_url
|
1371
|
+
|
1372
|
+
request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
|
1373
|
+
promise = request.run_promise do |req|
|
1374
|
+
@client.credentials.sign_request(req) unless @client.credentials.nil?
|
1375
|
+
end
|
1376
|
+
|
1377
|
+
promise = promise.then do |http_response|
|
1378
|
+
status_code = http_response.status
|
1379
|
+
response_content = http_response.body
|
1380
|
+
unless status_code == 200
|
1381
|
+
error_model = JSON.load(response_content)
|
1382
|
+
fail MsRest::HttpOperationError.new(request, http_response, error_model)
|
1383
|
+
end
|
1384
|
+
|
1385
|
+
# Create Result
|
1386
|
+
result = MsRestAzure::AzureOperationResponse.new(request, http_response)
|
1387
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
1388
|
+
# Deserialize Response
|
1389
|
+
if status_code == 200
|
1390
|
+
begin
|
1391
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
1392
|
+
result_mapper = ExportTaskListResult.mapper()
|
1393
|
+
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
|
1394
|
+
rescue Exception => e
|
1395
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
1396
|
+
end
|
1397
|
+
end
|
1398
|
+
|
1399
|
+
result
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
promise.execute
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
end
|
1406
|
+
end
|