azure_mgmt_monitor 0.15.2 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/2015-04-01/generated/azure_mgmt_monitor/autoscale_settings.rb +39 -37
- data/lib/2015-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +4 -1
- data/lib/2015-04-01/generated/azure_mgmt_monitor/operations.rb +6 -5
- data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rule_incidents.rb +12 -10
- data/lib/2016-03-01/generated/azure_mgmt_monitor/alert_rules.rb +30 -29
- data/lib/2016-03-01/generated/azure_mgmt_monitor/log_profiles.rb +30 -29
- data/lib/2016-03-01/generated/azure_mgmt_monitor/monitor_management_client.rb +4 -1
- data/lib/2016-09-01/generated/azure_mgmt_monitor/monitor_client.rb +4 -1
- data/lib/2016-09-01/generated/azure_mgmt_monitor/service_diagnostic_settings_operations.rb +18 -19
- data/lib/2017-04-01/generated/azure_mgmt_monitor.rb +10 -6
- data/lib/2017-04-01/generated/azure_mgmt_monitor/action_groups.rb +145 -34
- data/lib/2017-04-01/generated/azure_mgmt_monitor/activity_log_alerts.rb +36 -34
- data/lib/2017-04-01/generated/azure_mgmt_monitor/models/action_group_patch_body.rb +68 -0
- data/lib/2017-04-01/generated/azure_mgmt_monitor/models/action_group_resource.rb +63 -0
- data/lib/2017-04-01/generated/azure_mgmt_monitor/models/automation_runbook_receiver.rb +102 -0
- data/lib/2017-04-01/generated/azure_mgmt_monitor/models/azure_app_push_receiver.rb +58 -0
- data/lib/2017-04-01/generated/azure_mgmt_monitor/models/itsm_receiver.rb +94 -0
- data/lib/2017-04-01/generated/azure_mgmt_monitor/monitor_management_client.rb +4 -1
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor.rb +1 -1
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_category_operations.rb +13 -11
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/diagnostic_settings_operations.rb +25 -23
- data/lib/2017-05-01-preview/generated/azure_mgmt_monitor/{monitor_client.rb → monitor_management_client.rb} +6 -3
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor.rb +37 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb +275 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline.rb +86 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_metadata_value.rb +58 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_response.rb +171 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb +85 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/error_response.rb +57 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/localizable_string.rb +57 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/result_type.rb +16 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/sensitivity.rb +17 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/models/time_series_information.rb +93 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/module_definition.rb +9 -0
- data/lib/2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb +127 -0
- data/lib/azure_mgmt_monitor.rb +1 -0
- data/lib/profiles/latest/modules/monitor_profile_module.rb +329 -243
- data/lib/profiles/latest/monitor_latest_profile_client.rb +28 -9
- data/lib/profiles/latest/monitor_module_definition.rb +0 -1
- data/lib/version.rb +1 -1
- metadata +21 -4
@@ -0,0 +1,37 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# Code generated by Microsoft (R) AutoRest Code Generator.
|
3
|
+
# Changes may cause incorrect behavior and will be lost if the code is
|
4
|
+
# regenerated.
|
5
|
+
|
6
|
+
require 'uri'
|
7
|
+
require 'cgi'
|
8
|
+
require 'date'
|
9
|
+
require 'json'
|
10
|
+
require 'base64'
|
11
|
+
require 'erb'
|
12
|
+
require 'securerandom'
|
13
|
+
require 'time'
|
14
|
+
require 'timeliness'
|
15
|
+
require 'faraday'
|
16
|
+
require 'faraday-cookie_jar'
|
17
|
+
require 'concurrent'
|
18
|
+
require 'ms_rest'
|
19
|
+
require '2017-11-01-preview/generated/azure_mgmt_monitor/module_definition'
|
20
|
+
require 'ms_rest_azure'
|
21
|
+
|
22
|
+
module Azure::Monitor::Mgmt::V2017_11_01_preview
|
23
|
+
autoload :MetricBaseline, '2017-11-01-preview/generated/azure_mgmt_monitor/metric_baseline.rb'
|
24
|
+
autoload :MonitorManagementClient, '2017-11-01-preview/generated/azure_mgmt_monitor/monitor_management_client.rb'
|
25
|
+
|
26
|
+
module Models
|
27
|
+
autoload :Baseline, '2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline.rb'
|
28
|
+
autoload :BaselineResponse, '2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_response.rb'
|
29
|
+
autoload :BaselineMetadataValue, '2017-11-01-preview/generated/azure_mgmt_monitor/models/baseline_metadata_value.rb'
|
30
|
+
autoload :TimeSeriesInformation, '2017-11-01-preview/generated/azure_mgmt_monitor/models/time_series_information.rb'
|
31
|
+
autoload :LocalizableString, '2017-11-01-preview/generated/azure_mgmt_monitor/models/localizable_string.rb'
|
32
|
+
autoload :CalculateBaselineResponse, '2017-11-01-preview/generated/azure_mgmt_monitor/models/calculate_baseline_response.rb'
|
33
|
+
autoload :ErrorResponse, '2017-11-01-preview/generated/azure_mgmt_monitor/models/error_response.rb'
|
34
|
+
autoload :Sensitivity, '2017-11-01-preview/generated/azure_mgmt_monitor/models/sensitivity.rb'
|
35
|
+
autoload :ResultType, '2017-11-01-preview/generated/azure_mgmt_monitor/models/result_type.rb'
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,275 @@
|
|
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::Monitor::Mgmt::V2017_11_01_preview
|
7
|
+
#
|
8
|
+
# MetricBaseline
|
9
|
+
#
|
10
|
+
class MetricBaseline
|
11
|
+
include MsRestAzure
|
12
|
+
|
13
|
+
#
|
14
|
+
# Creates and initializes a new instance of the MetricBaseline class.
|
15
|
+
# @param client service class for accessing basic functionality.
|
16
|
+
#
|
17
|
+
def initialize(client)
|
18
|
+
@client = client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @return [MonitorManagementClient] reference to the MonitorManagementClient
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# **Gets the baseline values for a specific metric**.
|
26
|
+
#
|
27
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
28
|
+
# following structure:
|
29
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
30
|
+
# For example:
|
31
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
32
|
+
# @param metric_name [String] The name of the metric to retrieve the baseline
|
33
|
+
# for.
|
34
|
+
# @param timespan [String] The timespan of the query. It is a string with the
|
35
|
+
# following format 'startDateTime_ISO/endDateTime_ISO'.
|
36
|
+
# @param interval [Duration] The interval (i.e. timegrain) of the query.
|
37
|
+
# @param aggregation [String] The aggregation type of the metric to retrieve
|
38
|
+
# the baseline for.
|
39
|
+
# @param sensitivities [String] The list of sensitivities (comma separated) to
|
40
|
+
# retrieve.
|
41
|
+
# @param result_type [ResultType] Allows retrieving only metadata of the
|
42
|
+
# baseline. On data request all information is retrieved. Possible values
|
43
|
+
# include: 'Data', 'Metadata'
|
44
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
45
|
+
# will be added to the HTTP request.
|
46
|
+
#
|
47
|
+
# @return [BaselineResponse] operation results.
|
48
|
+
#
|
49
|
+
def get(resource_uri, metric_name, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, result_type:nil, custom_headers:nil)
|
50
|
+
response = get_async(resource_uri, metric_name, timespan:timespan, interval:interval, aggregation:aggregation, sensitivities:sensitivities, result_type:result_type, custom_headers:custom_headers).value!
|
51
|
+
response.body unless response.nil?
|
52
|
+
end
|
53
|
+
|
54
|
+
#
|
55
|
+
# **Gets the baseline values for a specific metric**.
|
56
|
+
#
|
57
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
58
|
+
# following structure:
|
59
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
60
|
+
# For example:
|
61
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
62
|
+
# @param metric_name [String] The name of the metric to retrieve the baseline
|
63
|
+
# for.
|
64
|
+
# @param timespan [String] The timespan of the query. It is a string with the
|
65
|
+
# following format 'startDateTime_ISO/endDateTime_ISO'.
|
66
|
+
# @param interval [Duration] The interval (i.e. timegrain) of the query.
|
67
|
+
# @param aggregation [String] The aggregation type of the metric to retrieve
|
68
|
+
# the baseline for.
|
69
|
+
# @param sensitivities [String] The list of sensitivities (comma separated) to
|
70
|
+
# retrieve.
|
71
|
+
# @param result_type [ResultType] Allows retrieving only metadata of the
|
72
|
+
# baseline. On data request all information is retrieved. Possible values
|
73
|
+
# include: 'Data', 'Metadata'
|
74
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
75
|
+
# will be added to the HTTP request.
|
76
|
+
#
|
77
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
78
|
+
#
|
79
|
+
def get_with_http_info(resource_uri, metric_name, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, result_type:nil, custom_headers:nil)
|
80
|
+
get_async(resource_uri, metric_name, timespan:timespan, interval:interval, aggregation:aggregation, sensitivities:sensitivities, result_type:result_type, custom_headers:custom_headers).value!
|
81
|
+
end
|
82
|
+
|
83
|
+
#
|
84
|
+
# **Gets the baseline values for a specific metric**.
|
85
|
+
#
|
86
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
87
|
+
# following structure:
|
88
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
89
|
+
# For example:
|
90
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
91
|
+
# @param metric_name [String] The name of the metric to retrieve the baseline
|
92
|
+
# for.
|
93
|
+
# @param timespan [String] The timespan of the query. It is a string with the
|
94
|
+
# following format 'startDateTime_ISO/endDateTime_ISO'.
|
95
|
+
# @param interval [Duration] The interval (i.e. timegrain) of the query.
|
96
|
+
# @param aggregation [String] The aggregation type of the metric to retrieve
|
97
|
+
# the baseline for.
|
98
|
+
# @param sensitivities [String] The list of sensitivities (comma separated) to
|
99
|
+
# retrieve.
|
100
|
+
# @param result_type [ResultType] Allows retrieving only metadata of the
|
101
|
+
# baseline. On data request all information is retrieved. Possible values
|
102
|
+
# include: 'Data', 'Metadata'
|
103
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
104
|
+
# to the HTTP request.
|
105
|
+
#
|
106
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
107
|
+
#
|
108
|
+
def get_async(resource_uri, metric_name, timespan:nil, interval:nil, aggregation:nil, sensitivities:nil, result_type:nil, custom_headers:nil)
|
109
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
110
|
+
fail ArgumentError, 'metric_name is nil' if metric_name.nil?
|
111
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
112
|
+
|
113
|
+
|
114
|
+
request_headers = {}
|
115
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
116
|
+
|
117
|
+
# Set Headers
|
118
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
119
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
120
|
+
path_template = '{resourceUri}/providers/microsoft.insights/baseline/{metricName}'
|
121
|
+
|
122
|
+
request_url = @base_url || @client.base_url
|
123
|
+
|
124
|
+
options = {
|
125
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
126
|
+
path_params: {'metricName' => metric_name},
|
127
|
+
skip_encoding_path_params: {'resourceUri' => resource_uri},
|
128
|
+
query_params: {'timespan' => timespan,'interval' => interval,'aggregation' => aggregation,'sensitivities' => sensitivities,'resultType' => result_type,'api-version' => @client.api_version},
|
129
|
+
headers: request_headers.merge(custom_headers || {}),
|
130
|
+
base_url: request_url
|
131
|
+
}
|
132
|
+
promise = @client.make_request_async(:get, path_template, options)
|
133
|
+
|
134
|
+
promise = promise.then do |result|
|
135
|
+
http_response = result.response
|
136
|
+
status_code = http_response.status
|
137
|
+
response_content = http_response.body
|
138
|
+
unless status_code == 200
|
139
|
+
error_model = JSON.load(response_content)
|
140
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
141
|
+
end
|
142
|
+
|
143
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
144
|
+
# Deserialize Response
|
145
|
+
if status_code == 200
|
146
|
+
begin
|
147
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
148
|
+
result_mapper = Azure::Monitor::Mgmt::V2017_11_01_preview::Models::BaselineResponse.mapper()
|
149
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
150
|
+
rescue Exception => e
|
151
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
result
|
156
|
+
end
|
157
|
+
|
158
|
+
promise.execute
|
159
|
+
end
|
160
|
+
|
161
|
+
#
|
162
|
+
# **Lists the baseline values for a resource**.
|
163
|
+
#
|
164
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
165
|
+
# following structure:
|
166
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
167
|
+
# For example:
|
168
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
169
|
+
# @param time_series_information [TimeSeriesInformation] Information that need
|
170
|
+
# to be specified to calculate a baseline on a time series.
|
171
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
172
|
+
# will be added to the HTTP request.
|
173
|
+
#
|
174
|
+
# @return [CalculateBaselineResponse] operation results.
|
175
|
+
#
|
176
|
+
def calculate_baseline(resource_uri, time_series_information, custom_headers:nil)
|
177
|
+
response = calculate_baseline_async(resource_uri, time_series_information, custom_headers:custom_headers).value!
|
178
|
+
response.body unless response.nil?
|
179
|
+
end
|
180
|
+
|
181
|
+
#
|
182
|
+
# **Lists the baseline values for a resource**.
|
183
|
+
#
|
184
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
185
|
+
# following structure:
|
186
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
187
|
+
# For example:
|
188
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
189
|
+
# @param time_series_information [TimeSeriesInformation] Information that need
|
190
|
+
# to be specified to calculate a baseline on a time series.
|
191
|
+
# @param custom_headers [Hash{String => String}] A hash of custom headers that
|
192
|
+
# will be added to the HTTP request.
|
193
|
+
#
|
194
|
+
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
|
195
|
+
#
|
196
|
+
def calculate_baseline_with_http_info(resource_uri, time_series_information, custom_headers:nil)
|
197
|
+
calculate_baseline_async(resource_uri, time_series_information, custom_headers:custom_headers).value!
|
198
|
+
end
|
199
|
+
|
200
|
+
#
|
201
|
+
# **Lists the baseline values for a resource**.
|
202
|
+
#
|
203
|
+
# @param resource_uri [String] The identifier of the resource. It has the
|
204
|
+
# following structure:
|
205
|
+
# subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/{providerName}/{resourceName}.
|
206
|
+
# For example:
|
207
|
+
# subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1
|
208
|
+
# @param time_series_information [TimeSeriesInformation] Information that need
|
209
|
+
# to be specified to calculate a baseline on a time series.
|
210
|
+
# @param [Hash{String => String}] A hash of custom headers that will be added
|
211
|
+
# to the HTTP request.
|
212
|
+
#
|
213
|
+
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
|
214
|
+
#
|
215
|
+
def calculate_baseline_async(resource_uri, time_series_information, custom_headers:nil)
|
216
|
+
fail ArgumentError, 'resource_uri is nil' if resource_uri.nil?
|
217
|
+
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
|
218
|
+
fail ArgumentError, 'time_series_information is nil' if time_series_information.nil?
|
219
|
+
|
220
|
+
|
221
|
+
request_headers = {}
|
222
|
+
request_headers['Content-Type'] = 'application/json; charset=utf-8'
|
223
|
+
|
224
|
+
# Set Headers
|
225
|
+
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
|
226
|
+
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
|
227
|
+
|
228
|
+
# Serialize Request
|
229
|
+
request_mapper = Azure::Monitor::Mgmt::V2017_11_01_preview::Models::TimeSeriesInformation.mapper()
|
230
|
+
request_content = @client.serialize(request_mapper, time_series_information)
|
231
|
+
request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
|
232
|
+
|
233
|
+
path_template = '{resourceUri}/providers/microsoft.insights/calculatebaseline'
|
234
|
+
|
235
|
+
request_url = @base_url || @client.base_url
|
236
|
+
|
237
|
+
options = {
|
238
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
239
|
+
skip_encoding_path_params: {'resourceUri' => resource_uri},
|
240
|
+
query_params: {'api-version' => @client.api_version},
|
241
|
+
body: request_content,
|
242
|
+
headers: request_headers.merge(custom_headers || {}),
|
243
|
+
base_url: request_url
|
244
|
+
}
|
245
|
+
promise = @client.make_request_async(:post, path_template, options)
|
246
|
+
|
247
|
+
promise = promise.then do |result|
|
248
|
+
http_response = result.response
|
249
|
+
status_code = http_response.status
|
250
|
+
response_content = http_response.body
|
251
|
+
unless status_code == 200
|
252
|
+
error_model = JSON.load(response_content)
|
253
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
254
|
+
end
|
255
|
+
|
256
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
257
|
+
# Deserialize Response
|
258
|
+
if status_code == 200
|
259
|
+
begin
|
260
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
261
|
+
result_mapper = Azure::Monitor::Mgmt::V2017_11_01_preview::Models::CalculateBaselineResponse.mapper()
|
262
|
+
result.body = @client.deserialize(result_mapper, parsed_response)
|
263
|
+
rescue Exception => e
|
264
|
+
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
result
|
269
|
+
end
|
270
|
+
|
271
|
+
promise.execute
|
272
|
+
end
|
273
|
+
|
274
|
+
end
|
275
|
+
end
|
@@ -0,0 +1,86 @@
|
|
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::Monitor::Mgmt::V2017_11_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# The baseline values for a single sensitivity value.
|
10
|
+
#
|
11
|
+
class Baseline
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [Sensitivity] the sensitivity of the baseline. Possible values
|
16
|
+
# include: 'Low', 'Medium', 'High'
|
17
|
+
attr_accessor :sensitivity
|
18
|
+
|
19
|
+
# @return [Array<Float>] The low thresholds of the baseline.
|
20
|
+
attr_accessor :low_thresholds
|
21
|
+
|
22
|
+
# @return [Array<Float>] The high thresholds of the baseline.
|
23
|
+
attr_accessor :high_thresholds
|
24
|
+
|
25
|
+
|
26
|
+
#
|
27
|
+
# Mapper for Baseline class as Ruby Hash.
|
28
|
+
# This will be used for serialization/deserialization.
|
29
|
+
#
|
30
|
+
def self.mapper()
|
31
|
+
{
|
32
|
+
client_side_validation: true,
|
33
|
+
required: false,
|
34
|
+
serialized_name: 'Baseline',
|
35
|
+
type: {
|
36
|
+
name: 'Composite',
|
37
|
+
class_name: 'Baseline',
|
38
|
+
model_properties: {
|
39
|
+
sensitivity: {
|
40
|
+
client_side_validation: true,
|
41
|
+
required: true,
|
42
|
+
serialized_name: 'sensitivity',
|
43
|
+
type: {
|
44
|
+
name: 'Enum',
|
45
|
+
module: 'Sensitivity'
|
46
|
+
}
|
47
|
+
},
|
48
|
+
low_thresholds: {
|
49
|
+
client_side_validation: true,
|
50
|
+
required: true,
|
51
|
+
serialized_name: 'lowThresholds',
|
52
|
+
type: {
|
53
|
+
name: 'Sequence',
|
54
|
+
element: {
|
55
|
+
client_side_validation: true,
|
56
|
+
required: false,
|
57
|
+
serialized_name: 'FloatElementType',
|
58
|
+
type: {
|
59
|
+
name: 'Double'
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
},
|
64
|
+
high_thresholds: {
|
65
|
+
client_side_validation: true,
|
66
|
+
required: true,
|
67
|
+
serialized_name: 'highThresholds',
|
68
|
+
type: {
|
69
|
+
name: 'Sequence',
|
70
|
+
element: {
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'FloatElementType',
|
74
|
+
type: {
|
75
|
+
name: 'Double'
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,58 @@
|
|
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::Monitor::Mgmt::V2017_11_01_preview
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Represents a baseline metadata value.
|
10
|
+
#
|
11
|
+
class BaselineMetadataValue
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [LocalizableString] the name of the metadata.
|
16
|
+
attr_accessor :name
|
17
|
+
|
18
|
+
# @return [String] the value of the metadata.
|
19
|
+
attr_accessor :value
|
20
|
+
|
21
|
+
|
22
|
+
#
|
23
|
+
# Mapper for BaselineMetadataValue 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: 'BaselineMetadataValue',
|
31
|
+
type: {
|
32
|
+
name: 'Composite',
|
33
|
+
class_name: 'BaselineMetadataValue',
|
34
|
+
model_properties: {
|
35
|
+
name: {
|
36
|
+
client_side_validation: true,
|
37
|
+
required: false,
|
38
|
+
serialized_name: 'name',
|
39
|
+
type: {
|
40
|
+
name: 'Composite',
|
41
|
+
class_name: 'LocalizableString'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
value: {
|
45
|
+
client_side_validation: true,
|
46
|
+
required: false,
|
47
|
+
serialized_name: 'value',
|
48
|
+
type: {
|
49
|
+
name: 'String'
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|