azure_mgmt_hanaonazure 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -43,6 +43,9 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
43
43
  # @return [HanaInstances] hana_instances
44
44
  attr_reader :hana_instances
45
45
 
46
+ # @return [SapMonitors] sap_monitors
47
+ attr_reader :sap_monitors
48
+
46
49
  #
47
50
  # Creates initializes a new instance of the HanaManagementClient class.
48
51
  # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
@@ -58,6 +61,7 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
58
61
 
59
62
  @operations = Operations.new(self)
60
63
  @hana_instances = HanaInstances.new(self)
64
+ @sap_monitors = SapMonitors.new(self)
61
65
  @api_version = '2017-11-03-preview'
62
66
  @accept_language = 'en-US'
63
67
  @long_running_operation_retry_timeout = 30
@@ -130,7 +134,7 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
130
134
  #
131
135
  def add_telemetry
132
136
  sdk_information = 'azure_mgmt_hanaonazure'
133
- sdk_information = "#{sdk_information}/0.17.0"
137
+ sdk_information = "#{sdk_information}/0.17.1"
134
138
  add_user_agent_information(sdk_information)
135
139
  end
136
140
  end
@@ -42,6 +42,15 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
42
42
  # @return [String] Hardware revision of a HANA instance
43
43
  attr_accessor :hw_revision
44
44
 
45
+ # @return [String] ARM ID of another HanaInstance that will share a
46
+ # network with this HanaInstance
47
+ attr_accessor :partner_node_id
48
+
49
+ # @return [HanaProvisioningStatesEnum] State of provisioning of the
50
+ # HanaInstance. Possible values include: 'Accepted', 'Creating',
51
+ # 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating'
52
+ attr_accessor :provisioning_state
53
+
45
54
 
46
55
  #
47
56
  # Mapper for HanaInstance class as Ruby Hash.
@@ -86,7 +95,6 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
86
95
  location: {
87
96
  client_side_validation: true,
88
97
  required: false,
89
- read_only: true,
90
98
  serialized_name: 'location',
91
99
  type: {
92
100
  name: 'String'
@@ -180,6 +188,23 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
180
188
  type: {
181
189
  name: 'String'
182
190
  }
191
+ },
192
+ partner_node_id: {
193
+ client_side_validation: true,
194
+ required: false,
195
+ serialized_name: 'properties.partnerNodeId',
196
+ type: {
197
+ name: 'String'
198
+ }
199
+ },
200
+ provisioning_state: {
201
+ client_side_validation: true,
202
+ required: false,
203
+ read_only: true,
204
+ serialized_name: 'properties.provisioningState',
205
+ type: {
206
+ name: 'String'
207
+ }
183
208
  }
184
209
  }
185
210
  }
@@ -27,6 +27,11 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
27
27
  S768m = "S768m"
28
28
  S768xm = "S768xm"
29
29
  S960m = "S960m"
30
+ S224o = "S224o"
31
+ S224m = "S224m"
32
+ S224om = "S224om"
33
+ S224oxm = "S224oxm"
34
+ S224oxxm = "S224oxxm"
30
35
  end
31
36
  end
32
37
  end
@@ -0,0 +1,21 @@
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::Hanaonazure::Mgmt::V2017_11_03_preview
7
+ module Models
8
+ #
9
+ # Defines values for HanaProvisioningStatesEnum
10
+ #
11
+ module HanaProvisioningStatesEnum
12
+ Accepted = "Accepted"
13
+ Creating = "Creating"
14
+ Updating = "Updating"
15
+ Failed = "Failed"
16
+ Succeeded = "Succeeded"
17
+ Deleting = "Deleting"
18
+ Migrating = "Migrating"
19
+ end
20
+ end
21
+ end
@@ -19,7 +19,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
19
19
  # @return [HanaInstanceSizeNamesEnum] Specifies the HANA instance SKU.
20
20
  # Possible values include: 'S72m', 'S144m', 'S72', 'S144', 'S192',
21
21
  # 'S192m', 'S192xm', 'S96', 'S384', 'S384m', 'S384xm', 'S384xxm',
22
- # 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m'
22
+ # 'S576m', 'S576xm', 'S768', 'S768m', 'S768xm', 'S960m', 'S224o',
23
+ # 'S224m', 'S224om', 'S224oxm', 'S224oxxm'
23
24
  attr_accessor :hana_instance_size
24
25
 
25
26
 
@@ -32,7 +32,6 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
32
32
  ip_address: {
33
33
  client_side_validation: true,
34
34
  required: false,
35
- read_only: true,
36
35
  serialized_name: 'ipAddress',
37
36
  type: {
38
37
  name: 'String'
@@ -22,6 +22,10 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
22
22
  # @return [String] Specifies version of operating system.
23
23
  attr_accessor :version
24
24
 
25
+ # @return [String] Specifies the SSH public key used to access the
26
+ # operating system.
27
+ attr_accessor :ssh_public_key
28
+
25
29
 
26
30
  #
27
31
  # Mapper for OSProfile class as Ruby Hash.
@@ -39,7 +43,6 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
39
43
  computer_name: {
40
44
  client_side_validation: true,
41
45
  required: false,
42
- read_only: true,
43
46
  serialized_name: 'computerName',
44
47
  type: {
45
48
  name: 'String'
@@ -62,6 +65,14 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
62
65
  type: {
63
66
  name: 'String'
64
67
  }
68
+ },
69
+ ssh_public_key: {
70
+ client_side_validation: true,
71
+ required: false,
72
+ serialized_name: 'sshPublicKey',
73
+ type: {
74
+ name: 'String'
75
+ }
65
76
  }
66
77
  }
67
78
  }
@@ -80,7 +80,6 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
80
80
  location: {
81
81
  client_side_validation: true,
82
82
  required: false,
83
- read_only: true,
84
83
  serialized_name: 'location',
85
84
  type: {
86
85
  name: 'String'
@@ -0,0 +1,167 @@
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::Hanaonazure::Mgmt::V2017_11_03_preview
7
+ module Models
8
+ #
9
+ # SAP monitor info on Azure (ARM properties and SAP monitor properties)
10
+ #
11
+ class SapMonitor < Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Specifies the SAP monitor unique ID.
16
+ attr_accessor :hana_subnet
17
+
18
+ # @return [String] Hostname of the HANA instance.
19
+ attr_accessor :hana_hostname
20
+
21
+ # @return [String] Database name of the HANA instance.
22
+ attr_accessor :hana_db_name
23
+
24
+ # @return [Integer] Database port of the HANA instance.
25
+ attr_accessor :hana_db_sql_port
26
+
27
+ # @return [String] Database username of the HANA instance.
28
+ attr_accessor :hana_db_username
29
+
30
+ # @return [String] Database password of the HANA instance.
31
+ attr_accessor :hana_db_password
32
+
33
+ # @return [HanaProvisioningStatesEnum] State of provisioning of the
34
+ # HanaInstance. Possible values include: 'Accepted', 'Creating',
35
+ # 'Updating', 'Failed', 'Succeeded', 'Deleting', 'Migrating'
36
+ attr_accessor :provisioning_state
37
+
38
+
39
+ #
40
+ # Mapper for SapMonitor class as Ruby Hash.
41
+ # This will be used for serialization/deserialization.
42
+ #
43
+ def self.mapper()
44
+ {
45
+ client_side_validation: true,
46
+ required: false,
47
+ serialized_name: 'SapMonitor',
48
+ type: {
49
+ name: 'Composite',
50
+ class_name: 'SapMonitor',
51
+ model_properties: {
52
+ id: {
53
+ client_side_validation: true,
54
+ required: false,
55
+ read_only: true,
56
+ serialized_name: 'id',
57
+ type: {
58
+ name: 'String'
59
+ }
60
+ },
61
+ name: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'name',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ type: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'type',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ location: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ serialized_name: 'location',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ },
87
+ tags: {
88
+ client_side_validation: true,
89
+ required: false,
90
+ read_only: true,
91
+ serialized_name: 'tags',
92
+ type: {
93
+ name: 'Dictionary',
94
+ value: {
95
+ client_side_validation: true,
96
+ required: false,
97
+ serialized_name: 'StringElementType',
98
+ type: {
99
+ name: 'String'
100
+ }
101
+ }
102
+ }
103
+ },
104
+ hana_subnet: {
105
+ client_side_validation: true,
106
+ required: false,
107
+ serialized_name: 'properties.hanaSubnet',
108
+ type: {
109
+ name: 'String'
110
+ }
111
+ },
112
+ hana_hostname: {
113
+ client_side_validation: true,
114
+ required: false,
115
+ serialized_name: 'properties.hanaHostname',
116
+ type: {
117
+ name: 'String'
118
+ }
119
+ },
120
+ hana_db_name: {
121
+ client_side_validation: true,
122
+ required: false,
123
+ serialized_name: 'properties.hanaDbName',
124
+ type: {
125
+ name: 'String'
126
+ }
127
+ },
128
+ hana_db_sql_port: {
129
+ client_side_validation: true,
130
+ required: false,
131
+ serialized_name: 'properties.hanaDbSqlPort',
132
+ type: {
133
+ name: 'Number'
134
+ }
135
+ },
136
+ hana_db_username: {
137
+ client_side_validation: true,
138
+ required: false,
139
+ serialized_name: 'properties.hanaDbUsername',
140
+ type: {
141
+ name: 'String'
142
+ }
143
+ },
144
+ hana_db_password: {
145
+ client_side_validation: true,
146
+ required: false,
147
+ serialized_name: 'properties.hanaDbPassword',
148
+ type: {
149
+ name: 'String'
150
+ }
151
+ },
152
+ provisioning_state: {
153
+ client_side_validation: true,
154
+ required: false,
155
+ read_only: true,
156
+ serialized_name: 'properties.provisioningState',
157
+ type: {
158
+ name: 'String'
159
+ }
160
+ }
161
+ }
162
+ }
163
+ }
164
+ end
165
+ end
166
+ end
167
+ end
@@ -0,0 +1,98 @@
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::Hanaonazure::Mgmt::V2017_11_03_preview
7
+ module Models
8
+ #
9
+ # The response from the List SAP monitors operation.
10
+ #
11
+ class SapMonitorListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [Array<SapMonitor>] The list of SAP monitors.
17
+ attr_accessor :value
18
+
19
+ # @return [String] The URL to get the next set of SAP monitors.
20
+ attr_accessor :next_link
21
+
22
+ # return [Proc] with next page method call.
23
+ attr_accessor :next_method
24
+
25
+ #
26
+ # Gets the rest of the items for the request, enabling auto-pagination.
27
+ #
28
+ # @return [Array<SapMonitor>] operation results.
29
+ #
30
+ def get_all_items
31
+ items = @value
32
+ page = self
33
+ while page.next_link != nil && !page.next_link.strip.empty? do
34
+ page = page.get_next_page
35
+ items.concat(page.value)
36
+ end
37
+ items
38
+ end
39
+
40
+ #
41
+ # Gets the next page of results.
42
+ #
43
+ # @return [SapMonitorListResult] with next page content.
44
+ #
45
+ def get_next_page
46
+ response = @next_method.call(@next_link).value! unless @next_method.nil?
47
+ unless response.nil?
48
+ @next_link = response.body.next_link
49
+ @value = response.body.value
50
+ self
51
+ end
52
+ end
53
+
54
+ #
55
+ # Mapper for SapMonitorListResult class as Ruby Hash.
56
+ # This will be used for serialization/deserialization.
57
+ #
58
+ def self.mapper()
59
+ {
60
+ client_side_validation: true,
61
+ required: false,
62
+ serialized_name: 'SapMonitorListResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'SapMonitorListResult',
66
+ model_properties: {
67
+ value: {
68
+ client_side_validation: true,
69
+ required: false,
70
+ serialized_name: 'value',
71
+ type: {
72
+ name: 'Sequence',
73
+ element: {
74
+ client_side_validation: true,
75
+ required: false,
76
+ serialized_name: 'SapMonitorElementType',
77
+ type: {
78
+ name: 'Composite',
79
+ class_name: 'SapMonitor'
80
+ }
81
+ }
82
+ }
83
+ },
84
+ next_link: {
85
+ client_side_validation: true,
86
+ required: false,
87
+ serialized_name: 'nextLink',
88
+ type: {
89
+ name: 'String'
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ end
96
+ end
97
+ end
98
+ end
@@ -86,6 +86,8 @@ module Azure::Hanaonazure::Mgmt::V2017_11_03_preview
86
86
  end
87
87
 
88
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?
89
91
  # Deserialize Response
90
92
  if status_code == 200
91
93
  begin
@@ -0,0 +1,771 @@
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::Hanaonazure::Mgmt::V2017_11_03_preview
7
+ #
8
+ # HANA on Azure Client
9
+ #
10
+ class SapMonitors
11
+ include MsRestAzure
12
+
13
+ #
14
+ # Creates and initializes a new instance of the SapMonitors class.
15
+ # @param client service class for accessing basic functionality.
16
+ #
17
+ def initialize(client)
18
+ @client = client
19
+ end
20
+
21
+ # @return [HanaManagementClient] reference to the HanaManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Gets a list of SAP monitors in the specified subscription.
26
+ #
27
+ # Gets a list of SAP monitors in the specified subscription. The operations
28
+ # returns various properties of each SAP monitor.
29
+ #
30
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
31
+ # will be added to the HTTP request.
32
+ #
33
+ # @return [Array<SapMonitor>] operation results.
34
+ #
35
+ def list(custom_headers:nil)
36
+ first_page = list_as_lazy(custom_headers:custom_headers)
37
+ first_page.get_all_items
38
+ end
39
+
40
+ #
41
+ # Gets a list of SAP monitors in the specified subscription.
42
+ #
43
+ # Gets a list of SAP monitors in the specified subscription. The operations
44
+ # returns various properties of each SAP monitor.
45
+ #
46
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
47
+ # will be added to the HTTP request.
48
+ #
49
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
50
+ #
51
+ def list_with_http_info(custom_headers:nil)
52
+ list_async(custom_headers:custom_headers).value!
53
+ end
54
+
55
+ #
56
+ # Gets a list of SAP monitors in the specified subscription.
57
+ #
58
+ # Gets a list of SAP monitors in the specified subscription. The operations
59
+ # returns various properties of each SAP monitor.
60
+ #
61
+ # @param [Hash{String => String}] A hash of custom headers that will be added
62
+ # to the HTTP request.
63
+ #
64
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
65
+ #
66
+ def list_async(custom_headers:nil)
67
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
68
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
69
+
70
+
71
+ request_headers = {}
72
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
73
+
74
+ # Set Headers
75
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
76
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
77
+ path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.HanaOnAzure/sapMonitors'
78
+
79
+ request_url = @base_url || @client.base_url
80
+
81
+ options = {
82
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
83
+ path_params: {'subscriptionId' => @client.subscription_id},
84
+ query_params: {'api-version' => @client.api_version},
85
+ headers: request_headers.merge(custom_headers || {}),
86
+ base_url: request_url
87
+ }
88
+ promise = @client.make_request_async(:get, path_template, options)
89
+
90
+ promise = promise.then do |result|
91
+ http_response = result.response
92
+ status_code = http_response.status
93
+ response_content = http_response.body
94
+ unless status_code == 200
95
+ error_model = JSON.load(response_content)
96
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
97
+ end
98
+
99
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
100
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
101
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
102
+ # Deserialize Response
103
+ if status_code == 200
104
+ begin
105
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
106
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitorListResult.mapper()
107
+ result.body = @client.deserialize(result_mapper, parsed_response)
108
+ rescue Exception => e
109
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
110
+ end
111
+ end
112
+
113
+ result
114
+ end
115
+
116
+ promise.execute
117
+ end
118
+
119
+ #
120
+ # Gets properties of a SAP monitor.
121
+ #
122
+ # Gets properties of a SAP monitor for the specified subscription, resource
123
+ # group, and resource name.
124
+ #
125
+ # @param resource_group_name [String] Name of the resource group.
126
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
127
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
128
+ # will be added to the HTTP request.
129
+ #
130
+ # @return [SapMonitor] operation results.
131
+ #
132
+ def get(resource_group_name, sap_monitor_name, custom_headers:nil)
133
+ response = get_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers).value!
134
+ response.body unless response.nil?
135
+ end
136
+
137
+ #
138
+ # Gets properties of a SAP monitor.
139
+ #
140
+ # Gets properties of a SAP monitor for the specified subscription, resource
141
+ # group, and resource name.
142
+ #
143
+ # @param resource_group_name [String] Name of the resource group.
144
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
145
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
146
+ # will be added to the HTTP request.
147
+ #
148
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
149
+ #
150
+ def get_with_http_info(resource_group_name, sap_monitor_name, custom_headers:nil)
151
+ get_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers).value!
152
+ end
153
+
154
+ #
155
+ # Gets properties of a SAP monitor.
156
+ #
157
+ # Gets properties of a SAP monitor for the specified subscription, resource
158
+ # group, and resource name.
159
+ #
160
+ # @param resource_group_name [String] Name of the resource group.
161
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
162
+ # @param [Hash{String => String}] A hash of custom headers that will be added
163
+ # to the HTTP request.
164
+ #
165
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
166
+ #
167
+ def get_async(resource_group_name, sap_monitor_name, custom_headers:nil)
168
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
169
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
170
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
171
+ fail ArgumentError, 'sap_monitor_name is nil' if sap_monitor_name.nil?
172
+
173
+
174
+ request_headers = {}
175
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
176
+
177
+ # Set Headers
178
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
179
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
180
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'
181
+
182
+ request_url = @base_url || @client.base_url
183
+
184
+ options = {
185
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
186
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'sapMonitorName' => sap_monitor_name},
187
+ query_params: {'api-version' => @client.api_version},
188
+ headers: request_headers.merge(custom_headers || {}),
189
+ base_url: request_url
190
+ }
191
+ promise = @client.make_request_async(:get, path_template, options)
192
+
193
+ promise = promise.then do |result|
194
+ http_response = result.response
195
+ status_code = http_response.status
196
+ response_content = http_response.body
197
+ unless status_code == 200
198
+ error_model = JSON.load(response_content)
199
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
200
+ end
201
+
202
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
203
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
204
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
205
+ # Deserialize Response
206
+ if status_code == 200
207
+ begin
208
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
209
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
210
+ result.body = @client.deserialize(result_mapper, parsed_response)
211
+ rescue Exception => e
212
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
213
+ end
214
+ end
215
+
216
+ result
217
+ end
218
+
219
+ promise.execute
220
+ end
221
+
222
+ #
223
+ # Creates a SAP monitor.
224
+ #
225
+ # Creates a SAP monitor for the specified subscription, resource group, and
226
+ # resource name.
227
+ #
228
+ # @param resource_group_name [String] Name of the resource group.
229
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
230
+ # @param sap_monitor_parameter [SapMonitor] Request body representing a SAP
231
+ # Monitor
232
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
233
+ # will be added to the HTTP request.
234
+ #
235
+ # @return [SapMonitor] operation results.
236
+ #
237
+ def create(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:nil)
238
+ response = create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:custom_headers).value!
239
+ response.body unless response.nil?
240
+ end
241
+
242
+ #
243
+ # @param resource_group_name [String] Name of the resource group.
244
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
245
+ # @param sap_monitor_parameter [SapMonitor] Request body representing a SAP
246
+ # Monitor
247
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
248
+ # will be added to the HTTP request.
249
+ #
250
+ # @return [Concurrent::Promise] promise which provides async access to http
251
+ # response.
252
+ #
253
+ def create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:nil)
254
+ # Send request
255
+ promise = begin_create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:custom_headers)
256
+
257
+ promise = promise.then do |response|
258
+ # Defining deserialization method.
259
+ deserialize_method = lambda do |parsed_response|
260
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
261
+ parsed_response = @client.deserialize(result_mapper, parsed_response)
262
+ end
263
+
264
+ # Waiting for response.
265
+ @client.get_long_running_operation_result(response, deserialize_method)
266
+ end
267
+
268
+ promise
269
+ end
270
+
271
+ #
272
+ # Deletes a SAP monitor.
273
+ #
274
+ # Deletes a SAP monitor with the specified subscription, resource group, and
275
+ # monitor name.
276
+ #
277
+ # @param resource_group_name [String] Name of the resource group.
278
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
279
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
280
+ # will be added to the HTTP request.
281
+ #
282
+ def delete(resource_group_name, sap_monitor_name, custom_headers:nil)
283
+ response = delete_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers).value!
284
+ nil
285
+ end
286
+
287
+ #
288
+ # @param resource_group_name [String] Name of the resource group.
289
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
290
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
291
+ # will be added to the HTTP request.
292
+ #
293
+ # @return [Concurrent::Promise] promise which provides async access to http
294
+ # response.
295
+ #
296
+ def delete_async(resource_group_name, sap_monitor_name, custom_headers:nil)
297
+ # Send request
298
+ promise = begin_delete_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers)
299
+
300
+ promise = promise.then do |response|
301
+ # Defining deserialization method.
302
+ deserialize_method = lambda do |parsed_response|
303
+ end
304
+
305
+ # Waiting for response.
306
+ @client.get_long_running_operation_result(response, deserialize_method)
307
+ end
308
+
309
+ promise
310
+ end
311
+
312
+ #
313
+ # Patches the Tags field of a SAP monitor.
314
+ #
315
+ # Patches the Tags field of a SAP monitor for the specified subscription,
316
+ # resource group, and monitor name.
317
+ #
318
+ # @param resource_group_name [String] Name of the resource group.
319
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
320
+ # @param tags_parameter [Tags] Request body that only contains the new Tags
321
+ # field
322
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
323
+ # will be added to the HTTP request.
324
+ #
325
+ # @return [SapMonitor] operation results.
326
+ #
327
+ def update(resource_group_name, sap_monitor_name, tags_parameter, custom_headers:nil)
328
+ response = update_async(resource_group_name, sap_monitor_name, tags_parameter, custom_headers:custom_headers).value!
329
+ response.body unless response.nil?
330
+ end
331
+
332
+ #
333
+ # Patches the Tags field of a SAP monitor.
334
+ #
335
+ # Patches the Tags field of a SAP monitor for the specified subscription,
336
+ # resource group, and monitor name.
337
+ #
338
+ # @param resource_group_name [String] Name of the resource group.
339
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
340
+ # @param tags_parameter [Tags] Request body that only contains the new Tags
341
+ # field
342
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
343
+ # will be added to the HTTP request.
344
+ #
345
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
346
+ #
347
+ def update_with_http_info(resource_group_name, sap_monitor_name, tags_parameter, custom_headers:nil)
348
+ update_async(resource_group_name, sap_monitor_name, tags_parameter, custom_headers:custom_headers).value!
349
+ end
350
+
351
+ #
352
+ # Patches the Tags field of a SAP monitor.
353
+ #
354
+ # Patches the Tags field of a SAP monitor for the specified subscription,
355
+ # resource group, and monitor name.
356
+ #
357
+ # @param resource_group_name [String] Name of the resource group.
358
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
359
+ # @param tags_parameter [Tags] Request body that only contains the new Tags
360
+ # field
361
+ # @param [Hash{String => String}] A hash of custom headers that will be added
362
+ # to the HTTP request.
363
+ #
364
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
365
+ #
366
+ def update_async(resource_group_name, sap_monitor_name, tags_parameter, custom_headers:nil)
367
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
368
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
369
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
370
+ fail ArgumentError, 'sap_monitor_name is nil' if sap_monitor_name.nil?
371
+ fail ArgumentError, 'tags_parameter is nil' if tags_parameter.nil?
372
+
373
+
374
+ request_headers = {}
375
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
376
+
377
+ # Set Headers
378
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
379
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
380
+
381
+ # Serialize Request
382
+ request_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::Tags.mapper()
383
+ request_content = @client.serialize(request_mapper, tags_parameter)
384
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
385
+
386
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'
387
+
388
+ request_url = @base_url || @client.base_url
389
+
390
+ options = {
391
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
392
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'sapMonitorName' => sap_monitor_name},
393
+ query_params: {'api-version' => @client.api_version},
394
+ body: request_content,
395
+ headers: request_headers.merge(custom_headers || {}),
396
+ base_url: request_url
397
+ }
398
+ promise = @client.make_request_async(:patch, path_template, options)
399
+
400
+ promise = promise.then do |result|
401
+ http_response = result.response
402
+ status_code = http_response.status
403
+ response_content = http_response.body
404
+ unless status_code == 200
405
+ error_model = JSON.load(response_content)
406
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
407
+ end
408
+
409
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
410
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
411
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
412
+ # Deserialize Response
413
+ if status_code == 200
414
+ begin
415
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
416
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
417
+ result.body = @client.deserialize(result_mapper, parsed_response)
418
+ rescue Exception => e
419
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
420
+ end
421
+ end
422
+
423
+ result
424
+ end
425
+
426
+ promise.execute
427
+ end
428
+
429
+ #
430
+ # Creates a SAP monitor.
431
+ #
432
+ # Creates a SAP monitor for the specified subscription, resource group, and
433
+ # resource name.
434
+ #
435
+ # @param resource_group_name [String] Name of the resource group.
436
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
437
+ # @param sap_monitor_parameter [SapMonitor] Request body representing a SAP
438
+ # Monitor
439
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
440
+ # will be added to the HTTP request.
441
+ #
442
+ # @return [SapMonitor] operation results.
443
+ #
444
+ def begin_create(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:nil)
445
+ response = begin_create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:custom_headers).value!
446
+ response.body unless response.nil?
447
+ end
448
+
449
+ #
450
+ # Creates a SAP monitor.
451
+ #
452
+ # Creates a SAP monitor for the specified subscription, resource group, and
453
+ # resource name.
454
+ #
455
+ # @param resource_group_name [String] Name of the resource group.
456
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
457
+ # @param sap_monitor_parameter [SapMonitor] Request body representing a SAP
458
+ # Monitor
459
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
460
+ # will be added to the HTTP request.
461
+ #
462
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
463
+ #
464
+ def begin_create_with_http_info(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:nil)
465
+ begin_create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:custom_headers).value!
466
+ end
467
+
468
+ #
469
+ # Creates a SAP monitor.
470
+ #
471
+ # Creates a SAP monitor for the specified subscription, resource group, and
472
+ # resource name.
473
+ #
474
+ # @param resource_group_name [String] Name of the resource group.
475
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
476
+ # @param sap_monitor_parameter [SapMonitor] Request body representing a SAP
477
+ # Monitor
478
+ # @param [Hash{String => String}] A hash of custom headers that will be added
479
+ # to the HTTP request.
480
+ #
481
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
482
+ #
483
+ def begin_create_async(resource_group_name, sap_monitor_name, sap_monitor_parameter, custom_headers:nil)
484
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
485
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
486
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
487
+ fail ArgumentError, 'sap_monitor_name is nil' if sap_monitor_name.nil?
488
+ fail ArgumentError, 'sap_monitor_parameter is nil' if sap_monitor_parameter.nil?
489
+
490
+
491
+ request_headers = {}
492
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
493
+
494
+ # Set Headers
495
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
496
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
497
+
498
+ # Serialize Request
499
+ request_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
500
+ request_content = @client.serialize(request_mapper, sap_monitor_parameter)
501
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
502
+
503
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'
504
+
505
+ request_url = @base_url || @client.base_url
506
+
507
+ options = {
508
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
509
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'sapMonitorName' => sap_monitor_name},
510
+ query_params: {'api-version' => @client.api_version},
511
+ body: request_content,
512
+ headers: request_headers.merge(custom_headers || {}),
513
+ base_url: request_url
514
+ }
515
+ promise = @client.make_request_async(:put, path_template, options)
516
+
517
+ promise = promise.then do |result|
518
+ http_response = result.response
519
+ status_code = http_response.status
520
+ response_content = http_response.body
521
+ unless status_code == 200 || status_code == 201
522
+ error_model = JSON.load(response_content)
523
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
524
+ end
525
+
526
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
527
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
528
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
529
+ # Deserialize Response
530
+ if status_code == 200
531
+ begin
532
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
533
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
534
+ result.body = @client.deserialize(result_mapper, parsed_response)
535
+ rescue Exception => e
536
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
537
+ end
538
+ end
539
+ # Deserialize Response
540
+ if status_code == 201
541
+ begin
542
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
543
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitor.mapper()
544
+ result.body = @client.deserialize(result_mapper, parsed_response)
545
+ rescue Exception => e
546
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
547
+ end
548
+ end
549
+
550
+ result
551
+ end
552
+
553
+ promise.execute
554
+ end
555
+
556
+ #
557
+ # Deletes a SAP monitor.
558
+ #
559
+ # Deletes a SAP monitor with the specified subscription, resource group, and
560
+ # monitor name.
561
+ #
562
+ # @param resource_group_name [String] Name of the resource group.
563
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
564
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
565
+ # will be added to the HTTP request.
566
+ #
567
+ #
568
+ def begin_delete(resource_group_name, sap_monitor_name, custom_headers:nil)
569
+ response = begin_delete_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers).value!
570
+ nil
571
+ end
572
+
573
+ #
574
+ # Deletes a SAP monitor.
575
+ #
576
+ # Deletes a SAP monitor with the specified subscription, resource group, and
577
+ # monitor name.
578
+ #
579
+ # @param resource_group_name [String] Name of the resource group.
580
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
581
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
582
+ # will be added to the HTTP request.
583
+ #
584
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
585
+ #
586
+ def begin_delete_with_http_info(resource_group_name, sap_monitor_name, custom_headers:nil)
587
+ begin_delete_async(resource_group_name, sap_monitor_name, custom_headers:custom_headers).value!
588
+ end
589
+
590
+ #
591
+ # Deletes a SAP monitor.
592
+ #
593
+ # Deletes a SAP monitor with the specified subscription, resource group, and
594
+ # monitor name.
595
+ #
596
+ # @param resource_group_name [String] Name of the resource group.
597
+ # @param sap_monitor_name [String] Name of the SAP monitor resource.
598
+ # @param [Hash{String => String}] A hash of custom headers that will be added
599
+ # to the HTTP request.
600
+ #
601
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
602
+ #
603
+ def begin_delete_async(resource_group_name, sap_monitor_name, custom_headers:nil)
604
+ fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
605
+ fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
606
+ fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
607
+ fail ArgumentError, 'sap_monitor_name is nil' if sap_monitor_name.nil?
608
+
609
+
610
+ request_headers = {}
611
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
612
+
613
+ # Set Headers
614
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
615
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
616
+ path_template = 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HanaOnAzure/sapMonitors/{sapMonitorName}'
617
+
618
+ request_url = @base_url || @client.base_url
619
+
620
+ options = {
621
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
622
+ path_params: {'subscriptionId' => @client.subscription_id,'resourceGroupName' => resource_group_name,'sapMonitorName' => sap_monitor_name},
623
+ query_params: {'api-version' => @client.api_version},
624
+ headers: request_headers.merge(custom_headers || {}),
625
+ base_url: request_url
626
+ }
627
+ promise = @client.make_request_async(:delete, path_template, options)
628
+
629
+ promise = promise.then do |result|
630
+ http_response = result.response
631
+ status_code = http_response.status
632
+ response_content = http_response.body
633
+ unless status_code == 200 || status_code == 202 || status_code == 204
634
+ error_model = JSON.load(response_content)
635
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
636
+ end
637
+
638
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
639
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
640
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
641
+
642
+ result
643
+ end
644
+
645
+ promise.execute
646
+ end
647
+
648
+ #
649
+ # Gets a list of SAP monitors in the specified subscription.
650
+ #
651
+ # Gets a list of SAP monitors in the specified subscription. The operations
652
+ # returns various properties of each SAP monitor.
653
+ #
654
+ # @param next_page_link [String] The NextLink from the previous successful call
655
+ # to List operation.
656
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
657
+ # will be added to the HTTP request.
658
+ #
659
+ # @return [SapMonitorListResult] operation results.
660
+ #
661
+ def list_next(next_page_link, custom_headers:nil)
662
+ response = list_next_async(next_page_link, custom_headers:custom_headers).value!
663
+ response.body unless response.nil?
664
+ end
665
+
666
+ #
667
+ # Gets a list of SAP monitors in the specified subscription.
668
+ #
669
+ # Gets a list of SAP monitors in the specified subscription. The operations
670
+ # returns various properties of each SAP monitor.
671
+ #
672
+ # @param next_page_link [String] The NextLink from the previous successful call
673
+ # to List operation.
674
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
675
+ # will be added to the HTTP request.
676
+ #
677
+ # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
678
+ #
679
+ def list_next_with_http_info(next_page_link, custom_headers:nil)
680
+ list_next_async(next_page_link, custom_headers:custom_headers).value!
681
+ end
682
+
683
+ #
684
+ # Gets a list of SAP monitors in the specified subscription.
685
+ #
686
+ # Gets a list of SAP monitors in the specified subscription. The operations
687
+ # returns various properties of each SAP monitor.
688
+ #
689
+ # @param next_page_link [String] The NextLink from the previous successful call
690
+ # to List operation.
691
+ # @param [Hash{String => String}] A hash of custom headers that will be added
692
+ # to the HTTP request.
693
+ #
694
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
695
+ #
696
+ def list_next_async(next_page_link, custom_headers:nil)
697
+ fail ArgumentError, 'next_page_link is nil' if next_page_link.nil?
698
+
699
+
700
+ request_headers = {}
701
+ request_headers['Content-Type'] = 'application/json; charset=utf-8'
702
+
703
+ # Set Headers
704
+ request_headers['x-ms-client-request-id'] = SecureRandom.uuid
705
+ request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
706
+ path_template = '{nextLink}'
707
+
708
+ request_url = @base_url || @client.base_url
709
+
710
+ options = {
711
+ middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
712
+ skip_encoding_path_params: {'nextLink' => next_page_link},
713
+ headers: request_headers.merge(custom_headers || {}),
714
+ base_url: request_url
715
+ }
716
+ promise = @client.make_request_async(:get, path_template, options)
717
+
718
+ promise = promise.then do |result|
719
+ http_response = result.response
720
+ status_code = http_response.status
721
+ response_content = http_response.body
722
+ unless status_code == 200
723
+ error_model = JSON.load(response_content)
724
+ fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
725
+ end
726
+
727
+ result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
728
+ result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
729
+ result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
730
+ # Deserialize Response
731
+ if status_code == 200
732
+ begin
733
+ parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
734
+ result_mapper = Azure::Hanaonazure::Mgmt::V2017_11_03_preview::Models::SapMonitorListResult.mapper()
735
+ result.body = @client.deserialize(result_mapper, parsed_response)
736
+ rescue Exception => e
737
+ fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
738
+ end
739
+ end
740
+
741
+ result
742
+ end
743
+
744
+ promise.execute
745
+ end
746
+
747
+ #
748
+ # Gets a list of SAP monitors in the specified subscription.
749
+ #
750
+ # Gets a list of SAP monitors in the specified subscription. The operations
751
+ # returns various properties of each SAP monitor.
752
+ #
753
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
754
+ # will be added to the HTTP request.
755
+ #
756
+ # @return [SapMonitorListResult] which provide lazy access to pages of the
757
+ # response.
758
+ #
759
+ def list_as_lazy(custom_headers:nil)
760
+ response = list_async(custom_headers:custom_headers).value!
761
+ unless response.nil?
762
+ page = response.body
763
+ page.next_method = Proc.new do |next_page_link|
764
+ list_next_async(next_page_link, custom_headers:custom_headers)
765
+ end
766
+ page
767
+ end
768
+ end
769
+
770
+ end
771
+ end