azure_mgmt_datalake_analytics 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/LICENSE.txt +21 -0
  4. data/Rakefile +5 -0
  5. data/azure_mgmt_datalake_analytics.gemspec +34 -0
  6. data/lib/azure_mgmt_datalake_analytics.rb +4 -0
  7. data/lib/generated/azure_mgmt_datalake_analytics_account.rb +51 -0
  8. data/lib/generated/azure_mgmt_datalake_analytics_account/account.rb +3209 -0
  9. data/lib/generated/azure_mgmt_datalake_analytics_account/data_lake_analytics_account_management_client.rb +68 -0
  10. data/lib/generated/azure_mgmt_datalake_analytics_account/models/add_data_lake_store_parameters.rb +46 -0
  11. data/lib/generated/azure_mgmt_datalake_analytics_account/models/add_storage_account_parameters.rb +46 -0
  12. data/lib/generated/azure_mgmt_datalake_analytics_account/models/azure_async_operation_result.rb +66 -0
  13. data/lib/generated/azure_mgmt_datalake_analytics_account/models/blob_container.rb +79 -0
  14. data/lib/generated/azure_mgmt_datalake_analytics_account/models/blob_container_properties.rb +45 -0
  15. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account.rb +107 -0
  16. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_list_data_lake_store_result.rb +109 -0
  17. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_list_result.rb +96 -0
  18. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_list_storage_accounts_result.rb +108 -0
  19. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_properties.rb +167 -0
  20. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_state.rb +16 -0
  21. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_analytics_account_status.rb +23 -0
  22. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_store_account_info.rb +56 -0
  23. data/lib/generated/azure_mgmt_datalake_analytics_account/models/data_lake_store_account_info_properties.rb +44 -0
  24. data/lib/generated/azure_mgmt_datalake_analytics_account/models/error.rb +99 -0
  25. data/lib/generated/azure_mgmt_datalake_analytics_account/models/error_details.rb +69 -0
  26. data/lib/generated/azure_mgmt_datalake_analytics_account/models/inner_error.rb +56 -0
  27. data/lib/generated/azure_mgmt_datalake_analytics_account/models/list_blob_containers_result.rb +96 -0
  28. data/lib/generated/azure_mgmt_datalake_analytics_account/models/list_sas_tokens_result.rb +96 -0
  29. data/lib/generated/azure_mgmt_datalake_analytics_account/models/operation_status.rb +17 -0
  30. data/lib/generated/azure_mgmt_datalake_analytics_account/models/sas_token_info.rb +46 -0
  31. data/lib/generated/azure_mgmt_datalake_analytics_account/models/storage_account_info.rb +57 -0
  32. data/lib/generated/azure_mgmt_datalake_analytics_account/models/storage_account_properties.rb +55 -0
  33. data/lib/generated/azure_mgmt_datalake_analytics_account/module_definition.rb +9 -0
  34. data/lib/generated/azure_mgmt_datalake_analytics_account/version.rb +8 -0
  35. data/lib/generated/azure_mgmt_datalake_analytics_catalog.rb +70 -0
  36. data/lib/generated/azure_mgmt_datalake_analytics_catalog/catalog.rb +5600 -0
  37. data/lib/generated/azure_mgmt_datalake_analytics_catalog/data_lake_analytics_catalog_management_client.rb +67 -0
  38. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/catalog_item.rb +54 -0
  39. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/catalog_item_list.rb +54 -0
  40. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/data_lake_analytics_catalog_secret_create_or_update_parameters.rb +56 -0
  41. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/ddl_name.rb +78 -0
  42. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/entity_id.rb +56 -0
  43. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/external_table.rb +56 -0
  44. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/file_type.rb +16 -0
  45. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/type_field_info.rb +54 -0
  46. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_assembly.rb +138 -0
  47. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_assembly_clr.rb +78 -0
  48. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_assembly_dependency_info.rb +45 -0
  49. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_assembly_file_info.rb +66 -0
  50. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_assembly_list.rb +98 -0
  51. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_credential.rb +88 -0
  52. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_credential_list.rb +98 -0
  53. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_database.rb +58 -0
  54. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_database_list.rb +98 -0
  55. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_directed_column.rb +55 -0
  56. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_distribution_info.rb +83 -0
  57. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_external_data_source.rb +107 -0
  58. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_external_data_source_list.rb +99 -0
  59. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_index.rb +168 -0
  60. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_procedure.rb +89 -0
  61. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_procedure_list.rb +99 -0
  62. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_schema.rb +68 -0
  63. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_schema_list.rb +98 -0
  64. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_secret.rb +100 -0
  65. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table.rb +154 -0
  66. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_column.rb +55 -0
  67. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_list.rb +99 -0
  68. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_partition.rb +128 -0
  69. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_partition_list.rb +99 -0
  70. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_statistics.rb +190 -0
  71. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_statistics_list.rb +99 -0
  72. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_type.rb +173 -0
  73. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_type_list.rb +99 -0
  74. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_valued_function.rb +88 -0
  75. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_table_valued_function_list.rb +99 -0
  76. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_type.rb +203 -0
  77. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_type_list.rb +99 -0
  78. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_view.rb +89 -0
  79. data/lib/generated/azure_mgmt_datalake_analytics_catalog/models/usql_view_list.rb +99 -0
  80. data/lib/generated/azure_mgmt_datalake_analytics_catalog/module_definition.rb +9 -0
  81. data/lib/generated/azure_mgmt_datalake_analytics_job.rb +48 -0
  82. data/lib/generated/azure_mgmt_datalake_analytics_job/data_lake_analytics_job_management_client.rb +67 -0
  83. data/lib/generated/azure_mgmt_datalake_analytics_job/job.rb +938 -0
  84. data/lib/generated/azure_mgmt_datalake_analytics_job/models/compile_mode.rb +17 -0
  85. data/lib/generated/azure_mgmt_datalake_analytics_job/models/diagnostics.rb +102 -0
  86. data/lib/generated/azure_mgmt_datalake_analytics_job/models/hive_job_properties.rb +123 -0
  87. data/lib/generated/azure_mgmt_datalake_analytics_job/models/hive_job_statement_info.rb +74 -0
  88. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_data_path.rb +74 -0
  89. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_error_details.rb +198 -0
  90. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_info_list_result.rb +107 -0
  91. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_information.rb +245 -0
  92. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_inner_error.rb +162 -0
  93. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_properties.rb +77 -0
  94. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_resource.rb +68 -0
  95. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_resource_type.rb +20 -0
  96. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_result.rb +18 -0
  97. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_state.rb +24 -0
  98. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_state_audit_record.rb +79 -0
  99. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_statistics.rb +65 -0
  100. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_statistics_vertex_stage.rb +262 -0
  101. data/lib/generated/azure_mgmt_datalake_analytics_job/models/job_type.rb +16 -0
  102. data/lib/generated/azure_mgmt_datalake_analytics_job/models/severity_types.rb +17 -0
  103. data/lib/generated/azure_mgmt_datalake_analytics_job/models/usql_job_properties.rb +231 -0
  104. data/lib/generated/azure_mgmt_datalake_analytics_job/module_definition.rb +9 -0
  105. metadata +218 -0
@@ -0,0 +1,99 @@
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::DataLakeAnalytics::Catalog
7
+ module Models
8
+ #
9
+ # A Data Lake Analytics catalog U-SQL view item list.
10
+ #
11
+ class USqlViewList < CatalogItemList
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Array<USqlView>] the list of view in the database and schema
16
+ # combination
17
+ attr_accessor :value
18
+
19
+ # return [Proc] with next page method call.
20
+ attr_accessor :next_method
21
+
22
+ #
23
+ # Gets the rest of the items for the request, enabling auto-pagination.
24
+ #
25
+ # @return [Array<USqlView>] operation results.
26
+ #
27
+ def get_all_items
28
+ items = @value
29
+ page = self
30
+ while page.next_link != nil do
31
+ page = page.get_next_page
32
+ items.concat(page.value)
33
+ end
34
+ items
35
+ end
36
+
37
+ #
38
+ # Gets the next page of results.
39
+ #
40
+ # @return [USqlViewList] with next page content.
41
+ #
42
+ def get_next_page
43
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
44
+ unless response.nil?
45
+ @next_link = response.body.next_link
46
+ @value = response.body.value
47
+ self
48
+ end
49
+ end
50
+
51
+ #
52
+ # Mapper for USqlViewList class as Ruby Hash.
53
+ # This will be used for serialization/deserialization.
54
+ #
55
+ def self.mapper()
56
+ {
57
+ required: false,
58
+ serialized_name: 'USqlViewList',
59
+ type: {
60
+ name: 'Composite',
61
+ class_name: 'USqlViewList',
62
+ model_properties: {
63
+ count: {
64
+ required: false,
65
+ serialized_name: 'count',
66
+ type: {
67
+ name: 'Number'
68
+ }
69
+ },
70
+ next_link: {
71
+ required: false,
72
+ serialized_name: 'nextLink',
73
+ type: {
74
+ name: 'String'
75
+ }
76
+ },
77
+ value: {
78
+ required: false,
79
+ read_only: true,
80
+ serialized_name: 'value',
81
+ type: {
82
+ name: 'Sequence',
83
+ element: {
84
+ required: false,
85
+ serialized_name: 'USqlViewElementType',
86
+ type: {
87
+ name: 'Composite',
88
+ class_name: 'USqlView'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,9 @@
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 end
7
+ module Azure::ARM end
8
+ module Azure::ARM::DataLakeAnalytics end
9
+ module Azure::ARM::DataLakeAnalytics::Catalog end
@@ -0,0 +1,48 @@
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
+ 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 'generated/azure_mgmt_datalake_analytics_job/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ARM::DataLakeAnalytics::Job
23
+ autoload :Job, 'generated/azure_mgmt_datalake_analytics_job/job.rb'
24
+ autoload :DataLakeAnalyticsJobManagementClient, 'generated/azure_mgmt_datalake_analytics_job/data_lake_analytics_job_management_client.rb'
25
+
26
+ module Models
27
+ autoload :JobStatisticsVertexStage, 'generated/azure_mgmt_datalake_analytics_job/models/job_statistics_vertex_stage.rb'
28
+ autoload :JobStatistics, 'generated/azure_mgmt_datalake_analytics_job/models/job_statistics.rb'
29
+ autoload :JobDataPath, 'generated/azure_mgmt_datalake_analytics_job/models/job_data_path.rb'
30
+ autoload :JobStateAuditRecord, 'generated/azure_mgmt_datalake_analytics_job/models/job_state_audit_record.rb'
31
+ autoload :JobResource, 'generated/azure_mgmt_datalake_analytics_job/models/job_resource.rb'
32
+ autoload :Diagnostics, 'generated/azure_mgmt_datalake_analytics_job/models/diagnostics.rb'
33
+ autoload :HiveJobStatementInfo, 'generated/azure_mgmt_datalake_analytics_job/models/hive_job_statement_info.rb'
34
+ autoload :JobProperties, 'generated/azure_mgmt_datalake_analytics_job/models/job_properties.rb'
35
+ autoload :JobErrorDetails, 'generated/azure_mgmt_datalake_analytics_job/models/job_error_details.rb'
36
+ autoload :JobInnerError, 'generated/azure_mgmt_datalake_analytics_job/models/job_inner_error.rb'
37
+ autoload :JobInformation, 'generated/azure_mgmt_datalake_analytics_job/models/job_information.rb'
38
+ autoload :JobInfoListResult, 'generated/azure_mgmt_datalake_analytics_job/models/job_info_list_result.rb'
39
+ autoload :USqlJobProperties, 'generated/azure_mgmt_datalake_analytics_job/models/usql_job_properties.rb'
40
+ autoload :HiveJobProperties, 'generated/azure_mgmt_datalake_analytics_job/models/hive_job_properties.rb'
41
+ autoload :JobResourceType, 'generated/azure_mgmt_datalake_analytics_job/models/job_resource_type.rb'
42
+ autoload :SeverityTypes, 'generated/azure_mgmt_datalake_analytics_job/models/severity_types.rb'
43
+ autoload :CompileMode, 'generated/azure_mgmt_datalake_analytics_job/models/compile_mode.rb'
44
+ autoload :JobType, 'generated/azure_mgmt_datalake_analytics_job/models/job_type.rb'
45
+ autoload :JobState, 'generated/azure_mgmt_datalake_analytics_job/models/job_state.rb'
46
+ autoload :JobResult, 'generated/azure_mgmt_datalake_analytics_job/models/job_result.rb'
47
+ end
48
+ end
@@ -0,0 +1,67 @@
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::DataLakeAnalytics::Job
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class DataLakeAnalyticsJobManagementClient < MsRestAzure::AzureServiceClient
11
+ include MsRest::Serialization
12
+ include MsRestAzure
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_reader :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Client Api Version.
21
+ attr_reader :api_version
22
+
23
+ # @return [String] Gets the DNS suffix used as the base for all Azure Data
24
+ # Lake Analytics Job service requests.
25
+ attr_accessor :adla_job_dns_suffix
26
+
27
+ # @return [String] Gets or sets the preferred language for the response.
28
+ attr_accessor :accept_language
29
+
30
+ # @return [Integer] Gets or sets the retry timeout in seconds for Long
31
+ # Running Operations. Default value is 30.
32
+ attr_accessor :long_running_operation_retry_timeout
33
+
34
+ # @return [Boolean] When set to true a unique x-ms-client-request-id value
35
+ # is generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return Subscription credentials which uniquely identify client
39
+ # subscription.
40
+ attr_accessor :credentials
41
+
42
+ # @return [Job] job
43
+ attr_reader :job
44
+
45
+ #
46
+ # Creates initializes a new instance of the DataLakeAnalyticsJobManagementClient class.
47
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
48
+ # @param options [Array] filters to be applied to the HTTP requests.
49
+ #
50
+ def initialize(credentials, options = nil)
51
+ super(credentials, options)
52
+ @base_url = 'https://{accountName}.{adlaJobDnsSuffix}'
53
+
54
+ fail ArgumentError, 'credentials is nil' if credentials.nil?
55
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials)
56
+ @credentials = credentials
57
+
58
+ @job = Job.new(self)
59
+ @api_version = '2016-03-20-preview'
60
+ @adla_job_dns_suffix = 'azuredatalakeanalytics.net'
61
+ @accept_language = 'en-US'
62
+ @long_running_operation_retry_timeout = 30
63
+ @generate_client_request_id = true
64
+ end
65
+
66
+ end
67
+ end
@@ -0,0 +1,938 @@
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::DataLakeAnalytics::Job
7
+ #
8
+ # Creates an Azure Data Lake Analytics job client.
9
+ #
10
+ class Job
11
+ include Azure::ARM::DataLakeAnalytics::Job::Models
12
+ include MsRestAzure
13
+
14
+ #
15
+ # Creates and initializes a new instance of the Job class.
16
+ # @param client service class for accessing basic functionality.
17
+ #
18
+ def initialize(client)
19
+ @client = client
20
+ end
21
+
22
+ # @return reference to the DataLakeAnalyticsJobManagementClient
23
+ attr_reader :client
24
+
25
+ #
26
+ # Gets statistics of the specified job.
27
+ #
28
+ # @param account_name [String] The Azure Data Lake Analytics account to
29
+ # execute job operations on.
30
+ # @param job_identity JobInfo ID.
31
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
+ # will be added to the HTTP request.
33
+ #
34
+ # @return [JobStatistics] operation results.
35
+ #
36
+ def get_statistics(account_name, job_identity, custom_headers = nil)
37
+ response = get_statistics_async(account_name, job_identity, custom_headers).value!
38
+ response.body unless response.nil?
39
+ end
40
+
41
+ #
42
+ # Gets statistics of the specified job.
43
+ #
44
+ # @param account_name [String] The Azure Data Lake Analytics account to
45
+ # execute job operations on.
46
+ # @param job_identity JobInfo ID.
47
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
48
+ # will be added to the HTTP request.
49
+ #
50
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
51
+ #
52
+ def get_statistics_with_http_info(account_name, job_identity, custom_headers = nil)
53
+ get_statistics_async(account_name, job_identity, custom_headers).value!
54
+ end
55
+
56
+ #
57
+ # Gets statistics of the specified job.
58
+ #
59
+ # @param account_name [String] The Azure Data Lake Analytics account to
60
+ # execute job operations on.
61
+ # @param job_identity JobInfo ID.
62
+ # @param [Hash{String => String}] A hash of custom headers that will be added
63
+ # to the HTTP request.
64
+ #
65
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
66
+ #
67
+ def get_statistics_async(account_name, job_identity, custom_headers = nil)
68
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
69
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
70
+ fail ArgumentError, 'job_identity is nil' if job_identity.nil?
71
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
72
+
73
+
74
+ request_headers = {}
75
+
76
+ # Set Headers
77
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
78
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
79
+ path_template = '/Jobs/{jobIdentity}/GetStatistics'
80
+ options = {
81
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
82
+ path_params: {'jobIdentity' => job_identity},
83
+ query_params: {'api-version' => @client.api_version},
84
+ headers: request_headers.merge(custom_headers || {})
85
+ }
86
+
87
+ request_url = @base_url || @client.base_url
88
+ request_url = request_url.gsub('{accountName}', account_name)
89
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
90
+
91
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
92
+ promise = request.run_promise do |req|
93
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
94
+ end
95
+
96
+ promise = promise.then do |http_response|
97
+ status_code = http_response.status
98
+ response_content = http_response.body
99
+ unless status_code == 200
100
+ error_model = JSON.load(response_content)
101
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
102
+ end
103
+
104
+ # Create Result
105
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
106
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
107
+ # Deserialize Response
108
+ if status_code == 200
109
+ begin
110
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
111
+ result_mapper = JobStatistics.mapper()
112
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
113
+ rescue Exception => e
114
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
115
+ end
116
+ end
117
+
118
+ result
119
+ end
120
+
121
+ promise.execute
122
+ end
123
+
124
+ #
125
+ # Gets the job debug data information specified by the job ID.
126
+ #
127
+ # @param account_name [String] The Azure Data Lake Analytics account to
128
+ # execute job operations on.
129
+ # @param job_identity JobInfo ID.
130
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
131
+ # will be added to the HTTP request.
132
+ #
133
+ # @return [JobDataPath] operation results.
134
+ #
135
+ def get_debug_data_path(account_name, job_identity, custom_headers = nil)
136
+ response = get_debug_data_path_async(account_name, job_identity, custom_headers).value!
137
+ response.body unless response.nil?
138
+ end
139
+
140
+ #
141
+ # Gets the job debug data information specified by the job ID.
142
+ #
143
+ # @param account_name [String] The Azure Data Lake Analytics account to
144
+ # execute job operations on.
145
+ # @param job_identity JobInfo ID.
146
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
147
+ # will be added to the HTTP request.
148
+ #
149
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
150
+ #
151
+ def get_debug_data_path_with_http_info(account_name, job_identity, custom_headers = nil)
152
+ get_debug_data_path_async(account_name, job_identity, custom_headers).value!
153
+ end
154
+
155
+ #
156
+ # Gets the job debug data information specified by the job ID.
157
+ #
158
+ # @param account_name [String] The Azure Data Lake Analytics account to
159
+ # execute job operations on.
160
+ # @param job_identity JobInfo ID.
161
+ # @param [Hash{String => String}] A hash of custom headers that will be added
162
+ # to the HTTP request.
163
+ #
164
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
165
+ #
166
+ def get_debug_data_path_async(account_name, job_identity, custom_headers = nil)
167
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
168
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
169
+ fail ArgumentError, 'job_identity is nil' if job_identity.nil?
170
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
171
+
172
+
173
+ request_headers = {}
174
+
175
+ # Set Headers
176
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
177
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
178
+ path_template = '/Jobs/{jobIdentity}/GetDebugDataPath'
179
+ options = {
180
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
181
+ path_params: {'jobIdentity' => job_identity},
182
+ query_params: {'api-version' => @client.api_version},
183
+ headers: request_headers.merge(custom_headers || {})
184
+ }
185
+
186
+ request_url = @base_url || @client.base_url
187
+ request_url = request_url.gsub('{accountName}', account_name)
188
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
189
+
190
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
191
+ promise = request.run_promise do |req|
192
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
193
+ end
194
+
195
+ promise = promise.then do |http_response|
196
+ status_code = http_response.status
197
+ response_content = http_response.body
198
+ unless status_code == 200
199
+ error_model = JSON.load(response_content)
200
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
201
+ end
202
+
203
+ # Create Result
204
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
205
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
206
+ # Deserialize Response
207
+ if status_code == 200
208
+ begin
209
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
210
+ result_mapper = JobDataPath.mapper()
211
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
212
+ rescue Exception => e
213
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
214
+ end
215
+ end
216
+
217
+ result
218
+ end
219
+
220
+ promise.execute
221
+ end
222
+
223
+ #
224
+ # Builds (compiles) the specified job in the specified Data Lake Analytics
225
+ # account for job correctness and validation.
226
+ #
227
+ # @param account_name [String] The Azure Data Lake Analytics account to
228
+ # execute job operations on.
229
+ # @param parameters [JobInformation] The parameters to build a job.
230
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
231
+ # will be added to the HTTP request.
232
+ #
233
+ # @return [JobInformation] operation results.
234
+ #
235
+ def build(account_name, parameters, custom_headers = nil)
236
+ response = build_async(account_name, parameters, custom_headers).value!
237
+ response.body unless response.nil?
238
+ end
239
+
240
+ #
241
+ # Builds (compiles) the specified job in the specified Data Lake Analytics
242
+ # account for job correctness and validation.
243
+ #
244
+ # @param account_name [String] The Azure Data Lake Analytics account to
245
+ # execute job operations on.
246
+ # @param parameters [JobInformation] The parameters to build a job.
247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
248
+ # will be added to the HTTP request.
249
+ #
250
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
251
+ #
252
+ def build_with_http_info(account_name, parameters, custom_headers = nil)
253
+ build_async(account_name, parameters, custom_headers).value!
254
+ end
255
+
256
+ #
257
+ # Builds (compiles) the specified job in the specified Data Lake Analytics
258
+ # account for job correctness and validation.
259
+ #
260
+ # @param account_name [String] The Azure Data Lake Analytics account to
261
+ # execute job operations on.
262
+ # @param parameters [JobInformation] The parameters to build a job.
263
+ # @param [Hash{String => String}] A hash of custom headers that will be added
264
+ # to the HTTP request.
265
+ #
266
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
267
+ #
268
+ def build_async(account_name, parameters, custom_headers = nil)
269
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
270
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
271
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
272
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
273
+
274
+
275
+ request_headers = {}
276
+
277
+ # Set Headers
278
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
279
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
280
+
281
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
282
+
283
+ # Serialize Request
284
+ request_mapper = JobInformation.mapper()
285
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
286
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
287
+
288
+ path_template = '/BuildJob'
289
+ options = {
290
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
291
+ query_params: {'api-version' => @client.api_version},
292
+ body: request_content,
293
+ headers: request_headers.merge(custom_headers || {})
294
+ }
295
+
296
+ request_url = @base_url || @client.base_url
297
+ request_url = request_url.gsub('{accountName}', account_name)
298
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
299
+
300
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
301
+ promise = request.run_promise do |req|
302
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
303
+ end
304
+
305
+ promise = promise.then do |http_response|
306
+ status_code = http_response.status
307
+ response_content = http_response.body
308
+ unless status_code == 200
309
+ error_model = JSON.load(response_content)
310
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
311
+ end
312
+
313
+ # Create Result
314
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
315
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
316
+ # Deserialize Response
317
+ if status_code == 200
318
+ begin
319
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
320
+ result_mapper = JobInformation.mapper()
321
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
322
+ rescue Exception => e
323
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
324
+ end
325
+ end
326
+
327
+ result
328
+ end
329
+
330
+ promise.execute
331
+ end
332
+
333
+ #
334
+ # Cancels the running job specified by the job ID.
335
+ #
336
+ # @param account_name [String] The Azure Data Lake Analytics account to
337
+ # execute job operations on.
338
+ # @param job_identity JobInfo ID to cancel.
339
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
340
+ # will be added to the HTTP request.
341
+ #
342
+ #
343
+ def cancel(account_name, job_identity, custom_headers = nil)
344
+ response = cancel_async(account_name, job_identity, custom_headers).value!
345
+ nil
346
+ end
347
+
348
+ #
349
+ # Cancels the running job specified by the job ID.
350
+ #
351
+ # @param account_name [String] The Azure Data Lake Analytics account to
352
+ # execute job operations on.
353
+ # @param job_identity JobInfo ID to cancel.
354
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
355
+ # will be added to the HTTP request.
356
+ #
357
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
358
+ #
359
+ def cancel_with_http_info(account_name, job_identity, custom_headers = nil)
360
+ cancel_async(account_name, job_identity, custom_headers).value!
361
+ end
362
+
363
+ #
364
+ # Cancels the running job specified by the job ID.
365
+ #
366
+ # @param account_name [String] The Azure Data Lake Analytics account to
367
+ # execute job operations on.
368
+ # @param job_identity JobInfo ID to cancel.
369
+ # @param [Hash{String => String}] A hash of custom headers that will be added
370
+ # to the HTTP request.
371
+ #
372
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
373
+ #
374
+ def cancel_async(account_name, job_identity, custom_headers = nil)
375
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
376
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
377
+ fail ArgumentError, 'job_identity is nil' if job_identity.nil?
378
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
379
+
380
+
381
+ request_headers = {}
382
+
383
+ # Set Headers
384
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
385
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
386
+ path_template = '/Jobs/{jobIdentity}/CancelJob'
387
+ options = {
388
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
389
+ path_params: {'jobIdentity' => job_identity},
390
+ query_params: {'api-version' => @client.api_version},
391
+ headers: request_headers.merge(custom_headers || {})
392
+ }
393
+
394
+ request_url = @base_url || @client.base_url
395
+ request_url = request_url.gsub('{accountName}', account_name)
396
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
397
+
398
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :post, options)
399
+ promise = request.run_promise do |req|
400
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
401
+ end
402
+
403
+ promise = promise.then do |http_response|
404
+ status_code = http_response.status
405
+ response_content = http_response.body
406
+ unless status_code == 200
407
+ error_model = JSON.load(response_content)
408
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
409
+ end
410
+
411
+ # Create Result
412
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
413
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
414
+
415
+ result
416
+ end
417
+
418
+ promise.execute
419
+ end
420
+
421
+ #
422
+ # Gets the job information for the specified job ID.
423
+ #
424
+ # @param account_name [String] The Azure Data Lake Analytics account to
425
+ # execute job operations on.
426
+ # @param job_identity JobInfo ID.
427
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
428
+ # will be added to the HTTP request.
429
+ #
430
+ # @return [JobInformation] operation results.
431
+ #
432
+ def get(account_name, job_identity, custom_headers = nil)
433
+ response = get_async(account_name, job_identity, custom_headers).value!
434
+ response.body unless response.nil?
435
+ end
436
+
437
+ #
438
+ # Gets the job information for the specified job ID.
439
+ #
440
+ # @param account_name [String] The Azure Data Lake Analytics account to
441
+ # execute job operations on.
442
+ # @param job_identity JobInfo ID.
443
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
444
+ # will be added to the HTTP request.
445
+ #
446
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
447
+ #
448
+ def get_with_http_info(account_name, job_identity, custom_headers = nil)
449
+ get_async(account_name, job_identity, custom_headers).value!
450
+ end
451
+
452
+ #
453
+ # Gets the job information for the specified job ID.
454
+ #
455
+ # @param account_name [String] The Azure Data Lake Analytics account to
456
+ # execute job operations on.
457
+ # @param job_identity JobInfo ID.
458
+ # @param [Hash{String => String}] A hash of custom headers that will be added
459
+ # to the HTTP request.
460
+ #
461
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
462
+ #
463
+ def get_async(account_name, job_identity, custom_headers = nil)
464
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
465
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
466
+ fail ArgumentError, 'job_identity is nil' if job_identity.nil?
467
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
468
+
469
+
470
+ request_headers = {}
471
+
472
+ # Set Headers
473
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
474
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
475
+ path_template = '/Jobs/{jobIdentity}'
476
+ options = {
477
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
478
+ path_params: {'jobIdentity' => job_identity},
479
+ query_params: {'api-version' => @client.api_version},
480
+ headers: request_headers.merge(custom_headers || {})
481
+ }
482
+
483
+ request_url = @base_url || @client.base_url
484
+ request_url = request_url.gsub('{accountName}', account_name)
485
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
486
+
487
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
488
+ promise = request.run_promise do |req|
489
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
490
+ end
491
+
492
+ promise = promise.then do |http_response|
493
+ status_code = http_response.status
494
+ response_content = http_response.body
495
+ unless status_code == 200
496
+ error_model = JSON.load(response_content)
497
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
498
+ end
499
+
500
+ # Create Result
501
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
502
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
503
+ # Deserialize Response
504
+ if status_code == 200
505
+ begin
506
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
507
+ result_mapper = JobInformation.mapper()
508
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
509
+ rescue Exception => e
510
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
511
+ end
512
+ end
513
+
514
+ result
515
+ end
516
+
517
+ promise.execute
518
+ end
519
+
520
+ #
521
+ # Submits a job to the specified Data Lake Analytics account.
522
+ #
523
+ # @param account_name [String] The Azure Data Lake Analytics account to
524
+ # execute job operations on.
525
+ # @param job_identity The job ID (a GUID) for the job being submitted.
526
+ # @param parameters [JobInformation] The parameters to submit a job.
527
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
528
+ # will be added to the HTTP request.
529
+ #
530
+ # @return [JobInformation] operation results.
531
+ #
532
+ def create(account_name, job_identity, parameters, custom_headers = nil)
533
+ response = create_async(account_name, job_identity, parameters, custom_headers).value!
534
+ response.body unless response.nil?
535
+ end
536
+
537
+ #
538
+ # Submits a job to the specified Data Lake Analytics account.
539
+ #
540
+ # @param account_name [String] The Azure Data Lake Analytics account to
541
+ # execute job operations on.
542
+ # @param job_identity The job ID (a GUID) for the job being submitted.
543
+ # @param parameters [JobInformation] The parameters to submit a job.
544
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
545
+ # will be added to the HTTP request.
546
+ #
547
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
548
+ #
549
+ def create_with_http_info(account_name, job_identity, parameters, custom_headers = nil)
550
+ create_async(account_name, job_identity, parameters, custom_headers).value!
551
+ end
552
+
553
+ #
554
+ # Submits a job to the specified Data Lake Analytics account.
555
+ #
556
+ # @param account_name [String] The Azure Data Lake Analytics account to
557
+ # execute job operations on.
558
+ # @param job_identity The job ID (a GUID) for the job being submitted.
559
+ # @param parameters [JobInformation] The parameters to submit a job.
560
+ # @param [Hash{String => String}] A hash of custom headers that will be added
561
+ # to the HTTP request.
562
+ #
563
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
564
+ #
565
+ def create_async(account_name, job_identity, parameters, custom_headers = nil)
566
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
567
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
568
+ fail ArgumentError, 'job_identity is nil' if job_identity.nil?
569
+ fail ArgumentError, 'parameters is nil' if parameters.nil?
570
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
571
+
572
+
573
+ request_headers = {}
574
+
575
+ # Set Headers
576
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
577
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
578
+
579
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
580
+
581
+ # Serialize Request
582
+ request_mapper = JobInformation.mapper()
583
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
584
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
585
+
586
+ path_template = '/Jobs/{jobIdentity}'
587
+ options = {
588
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
589
+ path_params: {'jobIdentity' => job_identity},
590
+ query_params: {'api-version' => @client.api_version},
591
+ body: request_content,
592
+ headers: request_headers.merge(custom_headers || {})
593
+ }
594
+
595
+ request_url = @base_url || @client.base_url
596
+ request_url = request_url.gsub('{accountName}', account_name)
597
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
598
+
599
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :put, options)
600
+ promise = request.run_promise do |req|
601
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
602
+ end
603
+
604
+ promise = promise.then do |http_response|
605
+ status_code = http_response.status
606
+ response_content = http_response.body
607
+ unless status_code == 200
608
+ error_model = JSON.load(response_content)
609
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
610
+ end
611
+
612
+ # Create Result
613
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
614
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
615
+ # Deserialize Response
616
+ if status_code == 200
617
+ begin
618
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
619
+ result_mapper = JobInformation.mapper()
620
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
621
+ rescue Exception => e
622
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
623
+ end
624
+ end
625
+
626
+ result
627
+ end
628
+
629
+ promise.execute
630
+ end
631
+
632
+ #
633
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
634
+ # account. The response includes a link to the next page of results, if any.
635
+ #
636
+ # @param account_name [String] The Azure Data Lake Analytics account to
637
+ # execute job operations on.
638
+ # @param filter [String] OData filter. Optional.
639
+ # @param top [Integer] The number of items to return. Optional.
640
+ # @param skip [Integer] The number of items to skip over before returning
641
+ # elements. Optional.
642
+ # @param expand [String] OData expansion. Expand related resources in line
643
+ # with the retrieved resources, e.g. Categories?$expand=Products would expand
644
+ # Product data in line with each Category entry. Optional.
645
+ # @param select [String] OData Select statement. Limits the properties on each
646
+ # entry to just those requested, e.g.
647
+ # Categories?$select=CategoryName,Description. Optional.
648
+ # @param orderby [String] OrderBy clause. One or more comma-separated
649
+ # expressions with an optional "asc" (the default) or "desc" depending on the
650
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
651
+ # desc. Optional.
652
+ # @param count [Boolean] The Boolean value of true or false to request a count
653
+ # of the matching resources included with the resources in the response, e.g.
654
+ # Categories?$count=true. Optional.
655
+ # @param search [String] A free form search. A free-text search expression to
656
+ # match for whether a particular entry should be included in the feed, e.g.
657
+ # Categories?$search=blue OR green. Optional.
658
+ # @param format [String] The return format. Return the response in particular
659
+ # formatxii without access to request headers for standard content-type
660
+ # negotiation (e.g Orders?$format=json). Optional.
661
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
662
+ # will be added to the HTTP request.
663
+ #
664
+ # @return [JobInfoListResult] which provide lazy access to pages of the
665
+ # response.
666
+ #
667
+ def list_as_lazy(account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
668
+ response = list_async(account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
669
+ unless response.nil?
670
+ page = response.body
671
+ page.next_method = Proc.new do |next_link|
672
+ list_next_async(next_link, custom_headers)
673
+ end
674
+ page
675
+ end
676
+ end
677
+
678
+ #
679
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
680
+ # account. The response includes a link to the next page of results, if any.
681
+ #
682
+ # @param account_name [String] The Azure Data Lake Analytics account to
683
+ # execute job operations on.
684
+ # @param filter [String] OData filter. Optional.
685
+ # @param top [Integer] The number of items to return. Optional.
686
+ # @param skip [Integer] The number of items to skip over before returning
687
+ # elements. Optional.
688
+ # @param expand [String] OData expansion. Expand related resources in line
689
+ # with the retrieved resources, e.g. Categories?$expand=Products would expand
690
+ # Product data in line with each Category entry. Optional.
691
+ # @param select [String] OData Select statement. Limits the properties on each
692
+ # entry to just those requested, e.g.
693
+ # Categories?$select=CategoryName,Description. Optional.
694
+ # @param orderby [String] OrderBy clause. One or more comma-separated
695
+ # expressions with an optional "asc" (the default) or "desc" depending on the
696
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
697
+ # desc. Optional.
698
+ # @param count [Boolean] The Boolean value of true or false to request a count
699
+ # of the matching resources included with the resources in the response, e.g.
700
+ # Categories?$count=true. Optional.
701
+ # @param search [String] A free form search. A free-text search expression to
702
+ # match for whether a particular entry should be included in the feed, e.g.
703
+ # Categories?$search=blue OR green. Optional.
704
+ # @param format [String] The return format. Return the response in particular
705
+ # formatxii without access to request headers for standard content-type
706
+ # negotiation (e.g Orders?$format=json). Optional.
707
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
708
+ # will be added to the HTTP request.
709
+ #
710
+ # @return [Array<JobInformation>] operation results.
711
+ #
712
+ def list(account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
713
+ first_page = list_as_lazy(account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers)
714
+ first_page.get_all_items
715
+ end
716
+
717
+ #
718
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
719
+ # account. The response includes a link to the next page of results, if any.
720
+ #
721
+ # @param account_name [String] The Azure Data Lake Analytics account to
722
+ # execute job operations on.
723
+ # @param filter [String] OData filter. Optional.
724
+ # @param top [Integer] The number of items to return. Optional.
725
+ # @param skip [Integer] The number of items to skip over before returning
726
+ # elements. Optional.
727
+ # @param expand [String] OData expansion. Expand related resources in line
728
+ # with the retrieved resources, e.g. Categories?$expand=Products would expand
729
+ # Product data in line with each Category entry. Optional.
730
+ # @param select [String] OData Select statement. Limits the properties on each
731
+ # entry to just those requested, e.g.
732
+ # Categories?$select=CategoryName,Description. Optional.
733
+ # @param orderby [String] OrderBy clause. One or more comma-separated
734
+ # expressions with an optional "asc" (the default) or "desc" depending on the
735
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
736
+ # desc. Optional.
737
+ # @param count [Boolean] The Boolean value of true or false to request a count
738
+ # of the matching resources included with the resources in the response, e.g.
739
+ # Categories?$count=true. Optional.
740
+ # @param search [String] A free form search. A free-text search expression to
741
+ # match for whether a particular entry should be included in the feed, e.g.
742
+ # Categories?$search=blue OR green. Optional.
743
+ # @param format [String] The return format. Return the response in particular
744
+ # formatxii without access to request headers for standard content-type
745
+ # negotiation (e.g Orders?$format=json). Optional.
746
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
747
+ # will be added to the HTTP request.
748
+ #
749
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
750
+ #
751
+ def list_with_http_info(account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
752
+ list_async(account_name, filter, top, skip, expand, select, orderby, count, search, format, custom_headers).value!
753
+ end
754
+
755
+ #
756
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
757
+ # account. The response includes a link to the next page of results, if any.
758
+ #
759
+ # @param account_name [String] The Azure Data Lake Analytics account to
760
+ # execute job operations on.
761
+ # @param filter [String] OData filter. Optional.
762
+ # @param top [Integer] The number of items to return. Optional.
763
+ # @param skip [Integer] The number of items to skip over before returning
764
+ # elements. Optional.
765
+ # @param expand [String] OData expansion. Expand related resources in line
766
+ # with the retrieved resources, e.g. Categories?$expand=Products would expand
767
+ # Product data in line with each Category entry. Optional.
768
+ # @param select [String] OData Select statement. Limits the properties on each
769
+ # entry to just those requested, e.g.
770
+ # Categories?$select=CategoryName,Description. Optional.
771
+ # @param orderby [String] OrderBy clause. One or more comma-separated
772
+ # expressions with an optional "asc" (the default) or "desc" depending on the
773
+ # order you'd like the values sorted, e.g. Categories?$orderby=CategoryName
774
+ # desc. Optional.
775
+ # @param count [Boolean] The Boolean value of true or false to request a count
776
+ # of the matching resources included with the resources in the response, e.g.
777
+ # Categories?$count=true. Optional.
778
+ # @param search [String] A free form search. A free-text search expression to
779
+ # match for whether a particular entry should be included in the feed, e.g.
780
+ # Categories?$search=blue OR green. Optional.
781
+ # @param format [String] The return format. Return the response in particular
782
+ # formatxii without access to request headers for standard content-type
783
+ # negotiation (e.g Orders?$format=json). Optional.
784
+ # @param [Hash{String => String}] A hash of custom headers that will be added
785
+ # to the HTTP request.
786
+ #
787
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
788
+ #
789
+ def list_async(account_name, filter = nil, top = nil, skip = nil, expand = nil, select = nil, orderby = nil, count = nil, search = nil, format = nil, custom_headers = nil)
790
+ fail ArgumentError, 'account_name is nil' if account_name.nil?
791
+ fail ArgumentError, '@client.adla_job_dns_suffix is nil' if @client.adla_job_dns_suffix.nil?
792
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
793
+
794
+
795
+ request_headers = {}
796
+
797
+ # Set Headers
798
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
799
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
800
+ path_template = '/Jobs'
801
+ options = {
802
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
803
+ query_params: {'$filter' => filter,'$top' => top,'$skip' => skip,'$expand' => expand,'$select' => select,'$orderby' => orderby,'$count' => count,'$search' => search,'$format' => format,'api-version' => @client.api_version},
804
+ headers: request_headers.merge(custom_headers || {})
805
+ }
806
+
807
+ request_url = @base_url || @client.base_url
808
+ request_url = request_url.gsub('{accountName}', account_name)
809
+ request_url = request_url.gsub('{adlaJobDnsSuffix}', @client.adla_job_dns_suffix)
810
+
811
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
812
+ promise = request.run_promise do |req|
813
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
814
+ end
815
+
816
+ promise = promise.then do |http_response|
817
+ status_code = http_response.status
818
+ response_content = http_response.body
819
+ unless status_code == 200
820
+ error_model = JSON.load(response_content)
821
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
822
+ end
823
+
824
+ # Create Result
825
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
826
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
827
+ # Deserialize Response
828
+ if status_code == 200
829
+ begin
830
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
831
+ result_mapper = JobInfoListResult.mapper()
832
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
833
+ rescue Exception => e
834
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
835
+ end
836
+ end
837
+
838
+ result
839
+ end
840
+
841
+ promise.execute
842
+ end
843
+
844
+ #
845
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
846
+ # account. The response includes a link to the next page of results, if any.
847
+ #
848
+ # @param next_page_link [String] The NextLink from the previous successful
849
+ # call to List operation.
850
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
851
+ # will be added to the HTTP request.
852
+ #
853
+ # @return [JobInfoListResult] operation results.
854
+ #
855
+ def list_next(next_page_link, custom_headers = nil)
856
+ response = list_next_async(next_page_link, custom_headers).value!
857
+ response.body unless response.nil?
858
+ end
859
+
860
+ #
861
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
862
+ # account. The response includes a link to the next page of results, if any.
863
+ #
864
+ # @param next_page_link [String] The NextLink from the previous successful
865
+ # call to List operation.
866
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
867
+ # will be added to the HTTP request.
868
+ #
869
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
870
+ #
871
+ def list_next_with_http_info(next_page_link, custom_headers = nil)
872
+ list_next_async(next_page_link, custom_headers).value!
873
+ end
874
+
875
+ #
876
+ # Lists the jobs, if any, associated with the specified Data Lake Analytics
877
+ # account. The response includes a link to the next page of results, if any.
878
+ #
879
+ # @param next_page_link [String] The NextLink from the previous successful
880
+ # call to List operation.
881
+ # @param [Hash{String => String}] A hash of custom headers that will be added
882
+ # to the HTTP request.
883
+ #
884
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
885
+ #
886
+ def list_next_async(next_page_link, custom_headers = nil)
887
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
888
+
889
+
890
+ request_headers = {}
891
+
892
+ # Set Headers
893
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
894
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
895
+ path_template = '{nextLink}'
896
+ options = {
897
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
898
+ skip_encoding_path_params: {'nextLink' => next_page_link},
899
+ headers: request_headers.merge(custom_headers || {})
900
+ }
901
+
902
+ request_url = @base_url || @client.base_url
903
+
904
+ request = MsRest::HttpOperationRequest.new(request_url, path_template, :get, options)
905
+ promise = request.run_promise do |req|
906
+ @client.credentials.sign_request(req) unless @client.credentials.nil?
907
+ end
908
+
909
+ promise = promise.then do |http_response|
910
+ status_code = http_response.status
911
+ response_content = http_response.body
912
+ unless status_code == 200
913
+ error_model = JSON.load(response_content)
914
+ fail MsRestAzure::AzureOperationError.new(request, http_response, error_model)
915
+ end
916
+
917
+ # Create Result
918
+ result = MsRestAzure::AzureOperationResponse.new(request, http_response)
919
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
920
+ # Deserialize Response
921
+ if status_code == 200
922
+ begin
923
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
924
+ result_mapper = JobInfoListResult.mapper()
925
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
926
+ rescue Exception => e
927
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
928
+ end
929
+ end
930
+
931
+ result
932
+ end
933
+
934
+ promise.execute
935
+ end
936
+
937
+ end
938
+ end