azure_mgmt_iot_central 0.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central.rb +42 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/apps.rb +1103 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/iot_central_client.rb +135 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app.rb +155 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_list_result.rb +99 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_name_availability_info.rb +74 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_name_unavailability_reason.rb +16 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_patch.rb +108 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_sku.rb +16 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/app_sku_info.rb +47 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/error_details.rb +71 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/operation.rb +60 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/operation_display.rb +83 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/operation_inputs.rb +47 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/operation_list_result.rb +102 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/models/resource.rb +113 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/module_definition.rb +9 -0
- data/lib/2017-07-01-privatepreview/generated/azure_mgmt_iot_central/operations.rb +219 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central.rb +43 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/apps.rb +1402 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/iot_central_client.rb +135 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app.rb +149 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_availability_info.rb +73 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_list_result.rb +99 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_patch.rb +114 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku.rb +19 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_sku_info.rb +47 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_template.rb +107 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/app_templates_result.rb +101 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/cloud_error_body.rb +92 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation.rb +60 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_display.rb +83 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_inputs.rb +60 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/operation_list_result.rb +102 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/models/resource.rb +113 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/module_definition.rb +9 -0
- data/lib/2018-09-01/generated/azure_mgmt_iot_central/operations.rb +219 -0
- data/lib/azure_mgmt_iot_central.rb +7 -0
- data/lib/module_definition.rb +8 -0
- data/lib/profiles/latest/iotcentral_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/iotcentral_module_definition.rb +8 -0
- data/lib/profiles/latest/modules/iotcentral_profile_module.rb +119 -0
- data/lib/version.rb +7 -0
- metadata +163 -0
@@ -0,0 +1,135 @@
|
|
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::IotCentral::Mgmt::V2017_07_01_privatepreview
|
7
|
+
#
|
8
|
+
# A service client - single point of access to the REST API.
|
9
|
+
#
|
10
|
+
class IotCentralClient < 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] The subscription identifier.
|
21
|
+
attr_accessor :subscription_id
|
22
|
+
|
23
|
+
# @return [String] The version of the API.
|
24
|
+
attr_reader :api_version
|
25
|
+
|
26
|
+
# @return [String] The preferred language for the response.
|
27
|
+
attr_accessor :accept_language
|
28
|
+
|
29
|
+
# @return [Integer] The retry timeout in seconds for Long Running
|
30
|
+
# Operations. Default value is 30.
|
31
|
+
attr_accessor :long_running_operation_retry_timeout
|
32
|
+
|
33
|
+
# @return [Boolean] Whether a unique x-ms-client-request-id should be
|
34
|
+
# generated. When set to true a unique x-ms-client-request-id value is
|
35
|
+
# generated and included in each request. Default is true.
|
36
|
+
attr_accessor :generate_client_request_id
|
37
|
+
|
38
|
+
# @return [Apps] apps
|
39
|
+
attr_reader :apps
|
40
|
+
|
41
|
+
# @return [Operations] operations
|
42
|
+
attr_reader :operations
|
43
|
+
|
44
|
+
#
|
45
|
+
# Creates initializes a new instance of the IotCentralClient class.
|
46
|
+
# @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
|
47
|
+
# @param base_url [String] the base URI of the service.
|
48
|
+
# @param options [Array] filters to be applied to the HTTP requests.
|
49
|
+
#
|
50
|
+
def initialize(credentials = nil, base_url = nil, options = nil)
|
51
|
+
super(credentials, options)
|
52
|
+
@base_url = base_url || 'https://management.azure.com'
|
53
|
+
|
54
|
+
fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
|
55
|
+
@credentials = credentials
|
56
|
+
|
57
|
+
@apps = Apps.new(self)
|
58
|
+
@operations = Operations.new(self)
|
59
|
+
@api_version = '2017-07-01-privatepreview'
|
60
|
+
@accept_language = 'en-US'
|
61
|
+
@long_running_operation_retry_timeout = 30
|
62
|
+
@generate_client_request_id = true
|
63
|
+
add_telemetry
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# Makes a request and returns the body of the response.
|
68
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
69
|
+
# @param path [String] the path, relative to {base_url}.
|
70
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
71
|
+
# @return [Hash{String=>String}] containing the body of the response.
|
72
|
+
# Example:
|
73
|
+
#
|
74
|
+
# request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
|
75
|
+
# path = "/path"
|
76
|
+
# options = {
|
77
|
+
# body: request_content,
|
78
|
+
# query_params: {'api-version' => '2016-02-01'}
|
79
|
+
# }
|
80
|
+
# result = @client.make_request(:put, path, options)
|
81
|
+
#
|
82
|
+
def make_request(method, path, options = {})
|
83
|
+
result = make_request_with_http_info(method, path, options)
|
84
|
+
result.body unless result.nil?
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# Makes a request and returns the operation response.
|
89
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
90
|
+
# @param path [String] the path, relative to {base_url}.
|
91
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
92
|
+
# @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
|
93
|
+
#
|
94
|
+
def make_request_with_http_info(method, path, options = {})
|
95
|
+
result = make_request_async(method, path, options).value!
|
96
|
+
result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
|
97
|
+
result
|
98
|
+
end
|
99
|
+
|
100
|
+
#
|
101
|
+
# Makes a request asynchronously.
|
102
|
+
# @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
|
103
|
+
# @param path [String] the path, relative to {base_url}.
|
104
|
+
# @param options [Hash{String=>String}] specifying any request options like :body.
|
105
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
106
|
+
#
|
107
|
+
def make_request_async(method, path, options = {})
|
108
|
+
fail ArgumentError, 'method is nil' if method.nil?
|
109
|
+
fail ArgumentError, 'path is nil' if path.nil?
|
110
|
+
|
111
|
+
request_url = options[:base_url] || @base_url
|
112
|
+
if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
|
113
|
+
@request_headers['Content-Type'] = options[:headers]['Content-Type']
|
114
|
+
end
|
115
|
+
|
116
|
+
request_headers = @request_headers
|
117
|
+
request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
|
118
|
+
options.merge!({headers: request_headers.merge(options[:headers] || {})})
|
119
|
+
options.merge!({credentials: @credentials}) unless @credentials.nil?
|
120
|
+
|
121
|
+
super(request_url, method, path, options)
|
122
|
+
end
|
123
|
+
|
124
|
+
|
125
|
+
private
|
126
|
+
#
|
127
|
+
# Adds telemetry information.
|
128
|
+
#
|
129
|
+
def add_telemetry
|
130
|
+
sdk_information = 'azure_mgmt_iot_central'
|
131
|
+
sdk_information = "#{sdk_information}/0.19.2"
|
132
|
+
add_user_agent_information(sdk_information)
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,155 @@
|
|
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::IotCentral::Mgmt::V2017_07_01_privatepreview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The IoT Central application.
|
10
|
+
#
|
11
|
+
class App < Resource
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] The ID of the application.
|
16
|
+
attr_accessor :application_id
|
17
|
+
|
18
|
+
# @return [String] The display name of the application.
|
19
|
+
attr_accessor :display_name
|
20
|
+
|
21
|
+
# @return [String] The subdomain of the application.
|
22
|
+
attr_accessor :subdomain
|
23
|
+
|
24
|
+
# @return [String] The ID of the application template, which is a
|
25
|
+
# blueprint that defines the characteristics and behaviors of an
|
26
|
+
# application. Optional; if not specified, defaults to a blank blueprint
|
27
|
+
# and allows the application to be defined from scratch.
|
28
|
+
attr_accessor :template
|
29
|
+
|
30
|
+
# @return [AppSkuInfo] A valid instance SKU.
|
31
|
+
attr_accessor :sku
|
32
|
+
|
33
|
+
|
34
|
+
#
|
35
|
+
# Mapper for App 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: 'App',
|
43
|
+
type: {
|
44
|
+
name: 'Composite',
|
45
|
+
class_name: 'App',
|
46
|
+
model_properties: {
|
47
|
+
id: {
|
48
|
+
client_side_validation: true,
|
49
|
+
required: false,
|
50
|
+
read_only: true,
|
51
|
+
serialized_name: 'id',
|
52
|
+
type: {
|
53
|
+
name: 'String'
|
54
|
+
}
|
55
|
+
},
|
56
|
+
name: {
|
57
|
+
client_side_validation: true,
|
58
|
+
required: false,
|
59
|
+
read_only: true,
|
60
|
+
serialized_name: 'name',
|
61
|
+
constraints: {
|
62
|
+
Pattern: '^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,99}[a-zA-Z0-9]$'
|
63
|
+
},
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
},
|
68
|
+
type: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
read_only: true,
|
72
|
+
serialized_name: 'type',
|
73
|
+
type: {
|
74
|
+
name: 'String'
|
75
|
+
}
|
76
|
+
},
|
77
|
+
location: {
|
78
|
+
client_side_validation: true,
|
79
|
+
required: true,
|
80
|
+
serialized_name: 'location',
|
81
|
+
type: {
|
82
|
+
name: 'String'
|
83
|
+
}
|
84
|
+
},
|
85
|
+
tags: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'tags',
|
89
|
+
type: {
|
90
|
+
name: 'Dictionary',
|
91
|
+
value: {
|
92
|
+
client_side_validation: true,
|
93
|
+
required: false,
|
94
|
+
serialized_name: 'StringElementType',
|
95
|
+
type: {
|
96
|
+
name: 'String'
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
application_id: {
|
102
|
+
client_side_validation: true,
|
103
|
+
required: false,
|
104
|
+
read_only: true,
|
105
|
+
serialized_name: 'properties.applicationId',
|
106
|
+
type: {
|
107
|
+
name: 'String'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
display_name: {
|
111
|
+
client_side_validation: true,
|
112
|
+
required: false,
|
113
|
+
serialized_name: 'properties.displayName',
|
114
|
+
constraints: {
|
115
|
+
Pattern: '^.{1,200}$'
|
116
|
+
},
|
117
|
+
type: {
|
118
|
+
name: 'String'
|
119
|
+
}
|
120
|
+
},
|
121
|
+
subdomain: {
|
122
|
+
client_side_validation: true,
|
123
|
+
required: false,
|
124
|
+
serialized_name: 'properties.subdomain',
|
125
|
+
constraints: {
|
126
|
+
Pattern: '^[a-z0-9-]{1,63}$'
|
127
|
+
},
|
128
|
+
type: {
|
129
|
+
name: 'String'
|
130
|
+
}
|
131
|
+
},
|
132
|
+
template: {
|
133
|
+
client_side_validation: true,
|
134
|
+
required: false,
|
135
|
+
serialized_name: 'properties.template',
|
136
|
+
type: {
|
137
|
+
name: 'String'
|
138
|
+
}
|
139
|
+
},
|
140
|
+
sku: {
|
141
|
+
client_side_validation: true,
|
142
|
+
required: true,
|
143
|
+
serialized_name: 'sku',
|
144
|
+
type: {
|
145
|
+
name: 'Composite',
|
146
|
+
class_name: 'AppSkuInfo'
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
end
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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::IotCentral::Mgmt::V2017_07_01_privatepreview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# A list of IoT Central Applications with a next link.
|
10
|
+
#
|
11
|
+
class AppListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [String] The link used to get the next page of IoT Central
|
17
|
+
# Applications.
|
18
|
+
attr_accessor :next_link
|
19
|
+
|
20
|
+
# @return [Array<App>] A list of IoT Central Applications.
|
21
|
+
attr_accessor :value
|
22
|
+
|
23
|
+
# return [Proc] with next page method call.
|
24
|
+
attr_accessor :next_method
|
25
|
+
|
26
|
+
#
|
27
|
+
# Gets the rest of the items for the request, enabling auto-pagination.
|
28
|
+
#
|
29
|
+
# @return [Array<App>] operation results.
|
30
|
+
#
|
31
|
+
def get_all_items
|
32
|
+
items = @value
|
33
|
+
page = self
|
34
|
+
while page.next_link != nil && !page.next_link.strip.empty? do
|
35
|
+
page = page.get_next_page
|
36
|
+
items.concat(page.value)
|
37
|
+
end
|
38
|
+
items
|
39
|
+
end
|
40
|
+
|
41
|
+
#
|
42
|
+
# Gets the next page of results.
|
43
|
+
#
|
44
|
+
# @return [AppListResult] with next page content.
|
45
|
+
#
|
46
|
+
def get_next_page
|
47
|
+
response = @next_method.call(@next_link).value! unless @next_method.nil?
|
48
|
+
unless response.nil?
|
49
|
+
@next_link = response.body.next_link
|
50
|
+
@value = response.body.value
|
51
|
+
self
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
#
|
56
|
+
# Mapper for AppListResult class as Ruby Hash.
|
57
|
+
# This will be used for serialization/deserialization.
|
58
|
+
#
|
59
|
+
def self.mapper()
|
60
|
+
{
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'AppListResult',
|
64
|
+
type: {
|
65
|
+
name: 'Composite',
|
66
|
+
class_name: 'AppListResult',
|
67
|
+
model_properties: {
|
68
|
+
next_link: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'nextLink',
|
72
|
+
type: {
|
73
|
+
name: 'String'
|
74
|
+
}
|
75
|
+
},
|
76
|
+
value: {
|
77
|
+
client_side_validation: true,
|
78
|
+
required: false,
|
79
|
+
serialized_name: 'value',
|
80
|
+
type: {
|
81
|
+
name: 'Sequence',
|
82
|
+
element: {
|
83
|
+
client_side_validation: true,
|
84
|
+
required: false,
|
85
|
+
serialized_name: 'AppElementType',
|
86
|
+
type: {
|
87
|
+
name: 'Composite',
|
88
|
+
class_name: 'App'
|
89
|
+
}
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,74 @@
|
|
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::IotCentral::Mgmt::V2017_07_01_privatepreview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The properties indicating whether a given IoT Central application name is
|
10
|
+
# available.
|
11
|
+
#
|
12
|
+
class AppNameAvailabilityInfo
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [Boolean] The value which indicates whether the provided name
|
17
|
+
# is available.
|
18
|
+
attr_accessor :name_available
|
19
|
+
|
20
|
+
# @return [AppNameUnavailabilityReason] The reason for unavailability.
|
21
|
+
# Possible values include: 'Invalid', 'AlreadyExists'
|
22
|
+
attr_accessor :reason
|
23
|
+
|
24
|
+
# @return [String] The detailed reason message.
|
25
|
+
attr_accessor :message
|
26
|
+
|
27
|
+
|
28
|
+
#
|
29
|
+
# Mapper for AppNameAvailabilityInfo class as Ruby Hash.
|
30
|
+
# This will be used for serialization/deserialization.
|
31
|
+
#
|
32
|
+
def self.mapper()
|
33
|
+
{
|
34
|
+
client_side_validation: true,
|
35
|
+
required: false,
|
36
|
+
serialized_name: 'AppNameAvailabilityInfo',
|
37
|
+
type: {
|
38
|
+
name: 'Composite',
|
39
|
+
class_name: 'AppNameAvailabilityInfo',
|
40
|
+
model_properties: {
|
41
|
+
name_available: {
|
42
|
+
client_side_validation: true,
|
43
|
+
required: false,
|
44
|
+
read_only: true,
|
45
|
+
serialized_name: 'nameAvailable',
|
46
|
+
type: {
|
47
|
+
name: 'Boolean'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
reason: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
read_only: true,
|
54
|
+
serialized_name: 'reason',
|
55
|
+
type: {
|
56
|
+
name: 'Enum',
|
57
|
+
module: 'AppNameUnavailabilityReason'
|
58
|
+
}
|
59
|
+
},
|
60
|
+
message: {
|
61
|
+
client_side_validation: true,
|
62
|
+
required: false,
|
63
|
+
serialized_name: 'message',
|
64
|
+
type: {
|
65
|
+
name: 'String'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
}
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|