azure_mgmt_iot_hub 0.17.4 → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/2016-02-03/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2017-01-19/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2017-07-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2018-01-22/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2018-04-01/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2018-12-01-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2019-03-22-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +1 -1
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub.rb +114 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/certificates.rb +723 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub.rb +172 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub_client.rb +147 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/iot_hub_resource.rb +3738 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/access_rights.rb +29 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/capabilities.rb +16 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_body_description.rb +47 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_description.rb +95 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_list_description.rb +56 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties.rb +118 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_properties_with_nonce.rb +133 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_verification_description.rb +47 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/certificate_with_nonce_description.rb +95 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/cloud_to_device_properties.rb +77 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data.rb +69 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_data_list_result.rb +100 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/endpoint_health_status.rb +18 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/enrichment_properties.rb +81 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/error_details.rb +83 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb +102 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_consumer_groups_list_result.rb +101 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/event_hub_properties.rb +107 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/export_devices_request.rb +59 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/failover_input.rb +46 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/fallback_route_properties.rb +114 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/feedback_properties.rb +77 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/import_devices_request.rb +58 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_capacity.rb +89 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description.rb +126 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_description_list_result.rb +100 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_location_description.rb +59 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_availability_info.rb +73 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_name_unavailability_reason.rb +16 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties.rb +275 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_properties_device_streams.rb +54 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info.rb +71 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_quota_metric_info_list_result.rb +101 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_replica_role_type.rb +16 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_scale_type.rb +17 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku.rb +21 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description.rb +71 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_description_list_result.rb +101 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_info.rb +73 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/iot_hub_sku_tier.rb +17 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_action_type.rb +16 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/ip_filter_rule.rb +71 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_response.rb +137 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_response_list_result.rb +99 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_status.rb +20 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/job_type.rb +24 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/matched_route.rb +47 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/messaging_endpoint_properties.rb +77 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/name.rb +57 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation.rb +60 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_display.rb +83 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_inputs.rb +46 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/operation_list_result.rb +103 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/registry_statistics.rb +73 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/resource.rb +113 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_compilation_error.rb +70 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_position.rb +57 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_range.rb +59 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_error_severity.rb +16 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/route_properties.rb +116 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_endpoints.rb +126 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_event_hub_properties.rb +87 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_message.rb +84 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_properties.rb +110 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_queue_endpoint_properties.rb +90 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_service_bus_topic_endpoint_properties.rb +90 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_source.rb +20 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_storage_container_properties.rb +157 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin.rb +58 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/routing_twin_properties.rb +58 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule.rb +89 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/shared_access_signature_authorization_rule_list_result.rb +103 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/storage_endpoint_properties.rb +73 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/tags_resource.rb +55 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_input.rb +73 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_all_routes_result.rb +55 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_result_status.rb +17 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_input.rb +71 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result.rb +59 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/test_route_result_details.rb +56 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota.rb +102 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/models/user_subscription_quota_list_result.rb +67 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/module_definition.rb +9 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/operations.rb +219 -0
- data/lib/2019-07-01-preview/generated/azure_mgmt_iot_hub/resource_provider_common.rb +117 -0
- data/lib/azure_mgmt_iot_hub.rb +5 -4
- data/lib/version.rb +1 -1
- metadata +93 -3
@@ -0,0 +1,59 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Result of testing one route
|
10
|
+
#
|
11
|
+
class TestRouteResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [TestResultStatus] Result of testing route. Possible values
|
16
|
+
# include: 'undefined', 'false', 'true'
|
17
|
+
attr_accessor :result
|
18
|
+
|
19
|
+
# @return [TestRouteResultDetails] Detailed result of testing route
|
20
|
+
attr_accessor :details
|
21
|
+
|
22
|
+
|
23
|
+
#
|
24
|
+
# Mapper for TestRouteResult class as Ruby Hash.
|
25
|
+
# This will be used for serialization/deserialization.
|
26
|
+
#
|
27
|
+
def self.mapper()
|
28
|
+
{
|
29
|
+
client_side_validation: true,
|
30
|
+
required: false,
|
31
|
+
serialized_name: 'TestRouteResult',
|
32
|
+
type: {
|
33
|
+
name: 'Composite',
|
34
|
+
class_name: 'TestRouteResult',
|
35
|
+
model_properties: {
|
36
|
+
result: {
|
37
|
+
client_side_validation: true,
|
38
|
+
required: false,
|
39
|
+
serialized_name: 'result',
|
40
|
+
type: {
|
41
|
+
name: 'String'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
details: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'details',
|
48
|
+
type: {
|
49
|
+
name: 'Composite',
|
50
|
+
class_name: 'TestRouteResultDetails'
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Detailed result of testing a route
|
10
|
+
#
|
11
|
+
class TestRouteResultDetails
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<RouteCompilationError>] JSON-serialized list of route
|
16
|
+
# compilation errors
|
17
|
+
attr_accessor :compilation_errors
|
18
|
+
|
19
|
+
|
20
|
+
#
|
21
|
+
# Mapper for TestRouteResultDetails class as Ruby Hash.
|
22
|
+
# This will be used for serialization/deserialization.
|
23
|
+
#
|
24
|
+
def self.mapper()
|
25
|
+
{
|
26
|
+
client_side_validation: true,
|
27
|
+
required: false,
|
28
|
+
serialized_name: 'TestRouteResultDetails',
|
29
|
+
type: {
|
30
|
+
name: 'Composite',
|
31
|
+
class_name: 'TestRouteResultDetails',
|
32
|
+
model_properties: {
|
33
|
+
compilation_errors: {
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'compilationErrors',
|
37
|
+
type: {
|
38
|
+
name: 'Sequence',
|
39
|
+
element: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'RouteCompilationErrorElementType',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'RouteCompilationError'
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# User subscription quota response
|
10
|
+
#
|
11
|
+
class UserSubscriptionQuota
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] IotHub type id
|
16
|
+
attr_accessor :id
|
17
|
+
|
18
|
+
# @return [String] Response type
|
19
|
+
attr_accessor :type
|
20
|
+
|
21
|
+
# @return [String] Unit of IotHub type
|
22
|
+
attr_accessor :unit
|
23
|
+
|
24
|
+
# @return [Integer] Current number of IotHub type
|
25
|
+
attr_accessor :current_value
|
26
|
+
|
27
|
+
# @return [Integer] Numerical limit on IotHub type
|
28
|
+
attr_accessor :limit
|
29
|
+
|
30
|
+
# @return [Name] IotHub type
|
31
|
+
attr_accessor :name
|
32
|
+
|
33
|
+
|
34
|
+
#
|
35
|
+
# Mapper for UserSubscriptionQuota class as Ruby Hash.
|
36
|
+
# This will be used for serialization/deserialization.
|
37
|
+
#
|
38
|
+
def self.mapper()
|
39
|
+
{
|
40
|
+
client_side_validation: true,
|
41
|
+
required: false,
|
42
|
+
serialized_name: 'UserSubscriptionQuota',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'UserSubscriptionQuota',
|
46
|
+
model_properties: {
|
47
|
+
id: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
serialized_name: 'id',
|
51
|
+
type: {
|
52
|
+
name: 'String'
|
53
|
+
}
|
54
|
+
},
|
55
|
+
type: {
|
56
|
+
client_side_validation: true,
|
57
|
+
required: false,
|
58
|
+
serialized_name: 'type',
|
59
|
+
type: {
|
60
|
+
name: 'String'
|
61
|
+
}
|
62
|
+
},
|
63
|
+
unit: {
|
64
|
+
client_side_validation: true,
|
65
|
+
required: false,
|
66
|
+
serialized_name: 'unit',
|
67
|
+
type: {
|
68
|
+
name: 'String'
|
69
|
+
}
|
70
|
+
},
|
71
|
+
current_value: {
|
72
|
+
client_side_validation: true,
|
73
|
+
required: false,
|
74
|
+
serialized_name: 'currentValue',
|
75
|
+
type: {
|
76
|
+
name: 'Number'
|
77
|
+
}
|
78
|
+
},
|
79
|
+
limit: {
|
80
|
+
client_side_validation: true,
|
81
|
+
required: false,
|
82
|
+
serialized_name: 'limit',
|
83
|
+
type: {
|
84
|
+
name: 'Number'
|
85
|
+
}
|
86
|
+
},
|
87
|
+
name: {
|
88
|
+
client_side_validation: true,
|
89
|
+
required: false,
|
90
|
+
serialized_name: 'name',
|
91
|
+
type: {
|
92
|
+
name: 'Composite',
|
93
|
+
class_name: 'Name'
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}
|
98
|
+
}
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Json-serialized array of User subscription quota response
|
10
|
+
#
|
11
|
+
class UserSubscriptionQuotaListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Array<UserSubscriptionQuota>]
|
16
|
+
attr_accessor :value
|
17
|
+
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :next_link
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for UserSubscriptionQuotaListResult class as Ruby Hash.
|
24
|
+
# This will be used for serialization/deserialization.
|
25
|
+
#
|
26
|
+
def self.mapper()
|
27
|
+
{
|
28
|
+
client_side_validation: true,
|
29
|
+
required: false,
|
30
|
+
serialized_name: 'UserSubscriptionQuotaListResult',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'UserSubscriptionQuotaListResult',
|
34
|
+
model_properties: {
|
35
|
+
value: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'value',
|
39
|
+
type: {
|
40
|
+
name: 'Sequence',
|
41
|
+
element: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
serialized_name: 'UserSubscriptionQuotaElementType',
|
45
|
+
type: {
|
46
|
+
name: 'Composite',
|
47
|
+
class_name: 'UserSubscriptionQuota'
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
},
|
52
|
+
next_link: {
|
53
|
+
client_side_validation: true,
|
54
|
+
required: false,
|
55
|
+
read_only: true,
|
56
|
+
serialized_name: 'nextLink',
|
57
|
+
type: {
|
58
|
+
name: 'String'
|
59
|
+
}
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure end
|
7
|
+
module Azure::IotHub end
|
8
|
+
module Azure::IotHub::Mgmt end
|
9
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview end
|
@@ -0,0 +1,219 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
module Azure::IotHub::Mgmt::V2019_07_01_preview
|
7
|
+
#
|
8
|
+
# Use this API to manage the IoT hubs in your Azure subscription.
|
9
|
+
#
|
10
|
+
class Operations
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the Operations class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [IotHubClient] reference to the IotHubClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# Lists all of the available IoT Hub REST API operations.
|
26
|
+
#
|
27
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
28
|
+
# will be added to the HTTP request.
|
29
|
+
#
|
30
|
+
# @return [Array<Operation>] operation results.
|
31
|
+
#
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
first_page = list_as_lazy(custom_headers:custom_headers)
|
34
|
+
first_page.get_all_items
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# Lists all of the available IoT Hub REST API operations.
|
39
|
+
#
|
40
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
41
|
+
# will be added to the HTTP request.
|
42
|
+
#
|
43
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
44
|
+
#
|
45
|
+
def list_with_http_info(custom_headers:nil)
|
46
|
+
list_async(custom_headers:custom_headers).value!
|
47
|
+
end
|
48
|
+
|
49
|
+
#
|
50
|
+
# Lists all of the available IoT Hub REST API operations.
|
51
|
+
#
|
52
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
53
|
+
# to the HTTP request.
|
54
|
+
#
|
55
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
56
|
+
#
|
57
|
+
def list_async(custom_headers:nil)
|
58
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
59
|
+
|
60
|
+
|
61
|
+
request_headers = {}
|
62
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
63
|
+
|
64
|
+
# Set Headers
|
65
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
66
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
67
|
+
path_template = 'providers/Microsoft.Devices/operations'
|
68
|
+
|
69
|
+
request_url = @base_url || @client.base_url
|
70
|
+
|
71
|
+
options = {
|
72
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
73
|
+
query_params: {'api-version' => @client.api_version},
|
74
|
+
headers: request_headers.merge(custom_headers || {}),
|
75
|
+
base_url: request_url
|
76
|
+
}
|
77
|
+
promise = @client.make_request_async(:get, path_template, options)
|
78
|
+
|
79
|
+
promise = promise.then do |result|
|
80
|
+
http_response = result.response
|
81
|
+
status_code = http_response.status
|
82
|
+
response_content = http_response.body
|
83
|
+
unless status_code == 200
|
84
|
+
error_model = JSON.load(response_content)
|
85
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
86
|
+
end
|
87
|
+
|
88
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::IotHub::Mgmt::V2019_07_01_preview::Models::OperationListResult.mapper()
|
96
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
97
|
+
rescue Exception => e
|
98
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
result
|
103
|
+
end
|
104
|
+
|
105
|
+
promise.execute
|
106
|
+
end
|
107
|
+
|
108
|
+
#
|
109
|
+
# Lists all of the available IoT Hub REST API operations.
|
110
|
+
#
|
111
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
112
|
+
# to List operation.
|
113
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
114
|
+
# will be added to the HTTP request.
|
115
|
+
#
|
116
|
+
# @return [OperationListResult] operation results.
|
117
|
+
#
|
118
|
+
def list_next(next_page_link, custom_headers:nil)
|
119
|
+
response = list_next_async(next_page_link, custom_headers:custom_headers).value!
|
120
|
+
response.body unless response.nil?
|
121
|
+
end
|
122
|
+
|
123
|
+
#
|
124
|
+
# Lists all of the available IoT Hub REST API operations.
|
125
|
+
#
|
126
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
127
|
+
# to List operation.
|
128
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
129
|
+
# will be added to the HTTP request.
|
130
|
+
#
|
131
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
132
|
+
#
|
133
|
+
def list_next_with_http_info(next_page_link, custom_headers:nil)
|
134
|
+
list_next_async(next_page_link, custom_headers:custom_headers).value!
|
135
|
+
end
|
136
|
+
|
137
|
+
#
|
138
|
+
# Lists all of the available IoT Hub REST API operations.
|
139
|
+
#
|
140
|
+
# @param next_page_link [String] The NextLink from the previous successful call
|
141
|
+
# to List operation.
|
142
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
143
|
+
# to the HTTP request.
|
144
|
+
#
|
145
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
146
|
+
#
|
147
|
+
def list_next_async(next_page_link, custom_headers:nil)
|
148
|
+
fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
|
149
|
+
|
150
|
+
|
151
|
+
request_headers = {}
|
152
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
153
|
+
|
154
|
+
# Set Headers
|
155
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
156
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
157
|
+
path_template = '{nextLink}'
|
158
|
+
|
159
|
+
request_url = @base_url || @client.base_url
|
160
|
+
|
161
|
+
options = {
|
162
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
163
|
+
skip_encoding_path_params: {'nextLink' => next_page_link},
|
164
|
+
headers: request_headers.merge(custom_headers || {}),
|
165
|
+
base_url: request_url
|
166
|
+
}
|
167
|
+
promise = @client.make_request_async(:get, path_template, options)
|
168
|
+
|
169
|
+
promise = promise.then do |result|
|
170
|
+
http_response = result.response
|
171
|
+
status_code = http_response.status
|
172
|
+
response_content = http_response.body
|
173
|
+
unless status_code == 200
|
174
|
+
error_model = JSON.load(response_content)
|
175
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
176
|
+
end
|
177
|
+
|
178
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
179
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
180
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
181
|
+
# Deserialize Response
|
182
|
+
if status_code == 200
|
183
|
+
begin
|
184
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
185
|
+
result_mapper = Azure::IotHub::Mgmt::V2019_07_01_preview::Models::OperationListResult.mapper()
|
186
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
187
|
+
rescue Exception => e
|
188
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
192
|
+
result
|
193
|
+
end
|
194
|
+
|
195
|
+
promise.execute
|
196
|
+
end
|
197
|
+
|
198
|
+
#
|
199
|
+
# Lists all of the available IoT Hub REST API operations.
|
200
|
+
#
|
201
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
202
|
+
# will be added to the HTTP request.
|
203
|
+
#
|
204
|
+
# @return [OperationListResult] which provide lazy access to pages of the
|
205
|
+
# response.
|
206
|
+
#
|
207
|
+
def list_as_lazy(custom_headers:nil)
|
208
|
+
response = list_async(custom_headers:custom_headers).value!
|
209
|
+
unless response.nil?
|
210
|
+
page = response.body
|
211
|
+
page.next_method = Proc.new do |next_page_link|
|
212
|
+
list_next_async(next_page_link, custom_headers:custom_headers)
|
213
|
+
end
|
214
|
+
page
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
end
|