azure_mgmt_advisor 0.17.0 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/lib/2016-07-12-preview/generated/azure_mgmt_advisor/advisor_management_client.rb +1 -1
  3. data/lib/2016-07-12-preview/generated/azure_mgmt_advisor/operations.rb +4 -0
  4. data/lib/2016-07-12-preview/generated/azure_mgmt_advisor/recommendations.rb +10 -0
  5. data/lib/2016-07-12-preview/generated/azure_mgmt_advisor/suppressions.rb +8 -0
  6. data/lib/2017-03-31/generated/azure_mgmt_advisor/advisor_management_client.rb +1 -1
  7. data/lib/2017-03-31/generated/azure_mgmt_advisor/operations.rb +4 -0
  8. data/lib/2017-03-31/generated/azure_mgmt_advisor/recommendations.rb +10 -0
  9. data/lib/2017-03-31/generated/azure_mgmt_advisor/suppressions.rb +8 -0
  10. data/lib/2017-04-19/generated/azure_mgmt_advisor/advisor_management_client.rb +1 -1
  11. data/lib/2017-04-19/generated/azure_mgmt_advisor/configurations.rb +10 -0
  12. data/lib/2017-04-19/generated/azure_mgmt_advisor/operations.rb +4 -0
  13. data/lib/2017-04-19/generated/azure_mgmt_advisor/recommendations.rb +10 -0
  14. data/lib/2017-04-19/generated/azure_mgmt_advisor/suppressions.rb +10 -0
  15. data/lib/2020-01-01/generated/azure_mgmt_advisor.rb +56 -0
  16. data/lib/2020-01-01/generated/azure_mgmt_advisor/advisor_management_client.rb +148 -0
  17. data/lib/2020-01-01/generated/azure_mgmt_advisor/configurations.rb +547 -0
  18. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/arm_error_response.rb +48 -0
  19. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/armerror_response_body.rb +59 -0
  20. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/category.rb +19 -0
  21. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/config_data.rb +108 -0
  22. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/configuration_list_result.rb +98 -0
  23. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/cpu_threshold.rb +18 -0
  24. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/digest_config.rb +115 -0
  25. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/digest_config_state.rb +16 -0
  26. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/impact.rb +17 -0
  27. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/metadata_entity.rb +140 -0
  28. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/metadata_entity_list_result.rb +98 -0
  29. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/metadata_supported_value_detail.rb +57 -0
  30. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/operation_display_info.rb +80 -0
  31. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/operation_entity.rb +58 -0
  32. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/operation_entity_list_result.rb +98 -0
  33. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/resource.rb +80 -0
  34. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/resource_metadata.rb +57 -0
  35. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/resource_recommendation_base.rb +225 -0
  36. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/resource_recommendation_base_list_result.rb +99 -0
  37. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/risk.rb +17 -0
  38. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/scenario.rb +15 -0
  39. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/short_description.rb +59 -0
  40. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/suppression_contract.rb +85 -0
  41. data/lib/2020-01-01/generated/azure_mgmt_advisor/models/suppression_contract_list_result.rb +98 -0
  42. data/lib/2020-01-01/generated/azure_mgmt_advisor/module_definition.rb +9 -0
  43. data/lib/2020-01-01/generated/azure_mgmt_advisor/operations.rb +219 -0
  44. data/lib/2020-01-01/generated/azure_mgmt_advisor/recommendation_metadata.rb +318 -0
  45. data/lib/2020-01-01/generated/azure_mgmt_advisor/recommendations.rb +513 -0
  46. data/lib/2020-01-01/generated/azure_mgmt_advisor/suppressions.rb +563 -0
  47. data/lib/azure_mgmt_advisor.rb +2 -1
  48. data/lib/profiles/latest/modules/advisor_profile_module.rb +80 -46
  49. data/lib/version.rb +1 -1
  50. metadata +37 -5
@@ -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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # The list of Advisor recommendations.
10
+ #
11
+ class ResourceRecommendationBaseListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] The link used to get the next page of recommendations.
17
+ attr_accessor :next_link
18
+
19
+ # @return [Array<ResourceRecommendationBase>] The list of
20
+ # recommendations.
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<ResourceRecommendationBase>] 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 [ResourceRecommendationBaseListResult] 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 ResourceRecommendationBaseListResult 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: 'ResourceRecommendationBaseListResult',
64
+ type: {
65
+ name: 'Composite',
66
+ class_name: 'ResourceRecommendationBaseListResult',
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: 'ResourceRecommendationBaseElementType',
86
+ type: {
87
+ name: 'Composite',
88
+ class_name: 'ResourceRecommendationBase'
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ }
96
+ end
97
+ end
98
+ end
99
+ end
@@ -0,0 +1,17 @@
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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # Defines values for Risk
10
+ #
11
+ module Risk
12
+ Error = "Error"
13
+ Warning = "Warning"
14
+ None = "None"
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # Defines values for Scenario
10
+ #
11
+ module Scenario
12
+ Alerts = "Alerts"
13
+ end
14
+ end
15
+ end
@@ -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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # A summary of the recommendation.
10
+ #
11
+ class ShortDescription
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The issue or opportunity identified by the
16
+ # recommendation.
17
+ attr_accessor :problem
18
+
19
+ # @return [String] The remediation action suggested by the
20
+ # recommendation.
21
+ attr_accessor :solution
22
+
23
+
24
+ #
25
+ # Mapper for ShortDescription class as Ruby Hash.
26
+ # This will be used for serialization/deserialization.
27
+ #
28
+ def self.mapper()
29
+ {
30
+ client_side_validation: true,
31
+ required: false,
32
+ serialized_name: 'ShortDescription',
33
+ type: {
34
+ name: 'Composite',
35
+ class_name: 'ShortDescription',
36
+ model_properties: {
37
+ problem: {
38
+ client_side_validation: true,
39
+ required: false,
40
+ serialized_name: 'problem',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ solution: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ serialized_name: 'solution',
49
+ type: {
50
+ name: 'String'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,85 @@
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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # The details of the snoozed or dismissed rule; for example, the duration,
10
+ # name, and GUID associated with the rule.
11
+ #
12
+ class SuppressionContract < Resource
13
+
14
+ include MsRestAzure
15
+
16
+ # @return [String] The GUID of the suppression.
17
+ attr_accessor :suppression_id
18
+
19
+ # @return [String] The duration for which the suppression is valid.
20
+ attr_accessor :ttl
21
+
22
+
23
+ #
24
+ # Mapper for SuppressionContract 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: 'SuppressionContract',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'SuppressionContract',
35
+ model_properties: {
36
+ id: {
37
+ client_side_validation: true,
38
+ required: false,
39
+ read_only: true,
40
+ serialized_name: 'id',
41
+ type: {
42
+ name: 'String'
43
+ }
44
+ },
45
+ name: {
46
+ client_side_validation: true,
47
+ required: false,
48
+ read_only: true,
49
+ serialized_name: 'name',
50
+ type: {
51
+ name: 'String'
52
+ }
53
+ },
54
+ type: {
55
+ client_side_validation: true,
56
+ required: false,
57
+ read_only: true,
58
+ serialized_name: 'type',
59
+ type: {
60
+ name: 'String'
61
+ }
62
+ },
63
+ suppression_id: {
64
+ client_side_validation: true,
65
+ required: false,
66
+ serialized_name: 'properties.suppressionId',
67
+ type: {
68
+ name: 'String'
69
+ }
70
+ },
71
+ ttl: {
72
+ client_side_validation: true,
73
+ required: false,
74
+ serialized_name: 'properties.ttl',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ 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::Advisor::Mgmt::V2020_01_01
7
+ module Models
8
+ #
9
+ # The list of Advisor suppressions.
10
+ #
11
+ class SuppressionContractListResult
12
+
13
+ include MsRestAzure
14
+
15
+ include MsRest::JSONable
16
+ # @return [String] The link used to get the next page of suppressions.
17
+ attr_accessor :next_link
18
+
19
+ # @return [Array<SuppressionContract>] The list of suppressions.
20
+ attr_accessor :value
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<SuppressionContract>] 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 [SuppressionContractListResult] 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 SuppressionContractListResult 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: 'SuppressionContractListResult',
63
+ type: {
64
+ name: 'Composite',
65
+ class_name: 'SuppressionContractListResult',
66
+ model_properties: {
67
+ next_link: {
68
+ client_side_validation: true,
69
+ required: false,
70
+ serialized_name: 'nextLink',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ value: {
76
+ client_side_validation: true,
77
+ required: false,
78
+ serialized_name: 'value',
79
+ type: {
80
+ name: 'Sequence',
81
+ element: {
82
+ client_side_validation: true,
83
+ required: false,
84
+ serialized_name: 'SuppressionContractElementType',
85
+ type: {
86
+ name: 'Composite',
87
+ class_name: 'SuppressionContract'
88
+ }
89
+ }
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ end
96
+ end
97
+ end
98
+ 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::Advisor end
8
+ module Azure::Advisor::Mgmt end
9
+ module Azure::Advisor::Mgmt::V2020_01_01 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::Advisor::Mgmt::V2020_01_01
7
+ #
8
+ # REST APIs for Azure Advisor
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 [AdvisorManagementClient] reference to the AdvisorManagementClient
22
+ attr_reader :client
23
+
24
+ #
25
+ # Lists all the available Advisor 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<OperationEntity>] 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 the available Advisor 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 the available Advisor 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.Advisor/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 MsRestAzure::AzureOperationError.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::Advisor::Mgmt::V2020_01_01::Models::OperationEntityListResult.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 the available Advisor 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 [OperationEntityListResult] 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 the available Advisor 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 the available Advisor 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 MsRestAzure::AzureOperationError.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::Advisor::Mgmt::V2020_01_01::Models::OperationEntityListResult.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 the available Advisor 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 [OperationEntityListResult] 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