azure_mgmt_support 0.17.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 +7 -0
- data/LICENSE.txt +21 -0
- data/lib/2020-04-01/generated/azure_mgmt_support.rb +62 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/communications.rb +661 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/microsoft_support.rb +147 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/check_name_availability_input.rb +59 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/check_name_availability_output.rb +72 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_details.rb +145 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_direction.rb +16 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_type.rb +16 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/communications_list_result.rb +99 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/contact_profile.rb +156 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/exception_response.rb +47 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/operation.rb +59 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/operation_display.rb +84 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/operations_list_result.rb +56 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/preferred_contact_method.rb +16 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/problem_classification.rb +83 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/problem_classifications_list_result.rb +56 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/quota_change_request.rb +58 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/quota_ticket_details.rb +82 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/service.rb +101 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/service_error.rb +89 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/service_error_detail.rb +70 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/service_level_agreement.rb +73 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/services_list_result.rb +55 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/severity_level.rb +18 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/status.rb +16 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/support_engineer.rb +48 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/support_ticket_details.rb +321 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/support_tickets_list_result.rb +99 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/technical_ticket_details.rb +48 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/type.rb +16 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/update_contact_profile.rb +156 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/models/update_support_ticket.rb +73 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/module_definition.rb +9 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/operations.rb +109 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/problem_classifications.rb +219 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/services.rb +222 -0
- data/lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb +854 -0
- data/lib/azure_mgmt_support.rb +6 -0
- data/lib/module_definition.rb +7 -0
- data/lib/profiles/latest/modules/support_profile_module.rb +189 -0
- data/lib/profiles/latest/support_latest_profile_client.rb +40 -0
- data/lib/profiles/latest/support_module_definition.rb +8 -0
- data/lib/version.rb +7 -0
- metadata +162 -0
@@ -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::Support::Mgmt::V2020_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Object that represents a collection of SupportTicket resources.
|
10
|
+
#
|
11
|
+
class SupportTicketsListResult
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
include MsRest::JSONable
|
16
|
+
# @return [Array<SupportTicketDetails>] List of SupportTicket resources.
|
17
|
+
attr_accessor :value
|
18
|
+
|
19
|
+
# @return [String] The URI to fetch the next page of SupportTicket
|
20
|
+
# resources.
|
21
|
+
attr_accessor :next_link
|
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<SupportTicketDetails>] 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 [SupportTicketsListResult] 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 SupportTicketsListResult 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: 'SupportTicketsListResult',
|
64
|
+
type: {
|
65
|
+
name: 'Composite',
|
66
|
+
class_name: 'SupportTicketsListResult',
|
67
|
+
model_properties: {
|
68
|
+
value: {
|
69
|
+
client_side_validation: true,
|
70
|
+
required: false,
|
71
|
+
serialized_name: 'value',
|
72
|
+
type: {
|
73
|
+
name: 'Sequence',
|
74
|
+
element: {
|
75
|
+
client_side_validation: true,
|
76
|
+
required: false,
|
77
|
+
serialized_name: 'SupportTicketDetailsElementType',
|
78
|
+
type: {
|
79
|
+
name: 'Composite',
|
80
|
+
class_name: 'SupportTicketDetails'
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
next_link: {
|
86
|
+
client_side_validation: true,
|
87
|
+
required: false,
|
88
|
+
serialized_name: 'nextLink',
|
89
|
+
type: {
|
90
|
+
name: 'String'
|
91
|
+
}
|
92
|
+
}
|
93
|
+
}
|
94
|
+
}
|
95
|
+
}
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,48 @@
|
|
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::Support::Mgmt::V2020_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Additional information for technical support ticket.
|
10
|
+
#
|
11
|
+
class TechnicalTicketDetails
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] This is the resource Id of the Azure service resource
|
16
|
+
# (For example: A virtual machine resource or an HDInsight resource) for
|
17
|
+
# which the support ticket is created.
|
18
|
+
attr_accessor :resource_id
|
19
|
+
|
20
|
+
|
21
|
+
#
|
22
|
+
# Mapper for TechnicalTicketDetails class as Ruby Hash.
|
23
|
+
# This will be used for serialization/deserialization.
|
24
|
+
#
|
25
|
+
def self.mapper()
|
26
|
+
{
|
27
|
+
client_side_validation: true,
|
28
|
+
required: false,
|
29
|
+
serialized_name: 'TechnicalTicketDetails',
|
30
|
+
type: {
|
31
|
+
name: 'Composite',
|
32
|
+
class_name: 'TechnicalTicketDetails',
|
33
|
+
model_properties: {
|
34
|
+
resource_id: {
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'resourceId',
|
38
|
+
type: {
|
39
|
+
name: 'String'
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|
43
|
+
}
|
44
|
+
}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,16 @@
|
|
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::Support::Mgmt::V2020_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Defines values for Type
|
10
|
+
#
|
11
|
+
module Type
|
12
|
+
MicrosoftSupportsupportTickets = "Microsoft.Support/supportTickets"
|
13
|
+
MicrosoftSupportcommunications = "Microsoft.Support/communications"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,156 @@
|
|
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::Support::Mgmt::V2020_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Contact information associated with the support ticket.
|
10
|
+
#
|
11
|
+
class UpdateContactProfile
|
12
|
+
|
13
|
+
include MsRestAzure
|
14
|
+
|
15
|
+
# @return [String] First name.
|
16
|
+
attr_accessor :first_name
|
17
|
+
|
18
|
+
# @return [String] Last name.
|
19
|
+
attr_accessor :last_name
|
20
|
+
|
21
|
+
# @return [PreferredContactMethod] Preferred contact method. Possible
|
22
|
+
# values include: 'email', 'phone'
|
23
|
+
attr_accessor :preferred_contact_method
|
24
|
+
|
25
|
+
# @return [String] Primary email address.
|
26
|
+
attr_accessor :primary_email_address
|
27
|
+
|
28
|
+
# @return [Array<String>] Email addresses listed will be copied on any
|
29
|
+
# correspondence about the support ticket.
|
30
|
+
attr_accessor :additional_email_addresses
|
31
|
+
|
32
|
+
# @return [String] Phone number. This is required if preferred contact
|
33
|
+
# method is phone.
|
34
|
+
attr_accessor :phone_number
|
35
|
+
|
36
|
+
# @return [String] Time zone of the user. This is the name of the time
|
37
|
+
# zone from [Microsoft Time Zone Index
|
38
|
+
# Values](https://support.microsoft.com/help/973627/microsoft-time-zone-index-values).
|
39
|
+
attr_accessor :preferred_time_zone
|
40
|
+
|
41
|
+
# @return [String] Country of the user. This is the ISO 3166-1 alpha-3
|
42
|
+
# code.
|
43
|
+
attr_accessor :country
|
44
|
+
|
45
|
+
# @return [String] Preferred language of support from Azure. Support
|
46
|
+
# languages vary based on the severity you choose for your support
|
47
|
+
# ticket. Learn more at [Azure Severity and
|
48
|
+
# responsiveness](https://azure.microsoft.com/support/plans/response/).
|
49
|
+
# Use the standard language-country code. Valid values are 'en-us' for
|
50
|
+
# English, 'zh-hans' for Chinese, 'es-es' for Spanish, 'fr-fr' for
|
51
|
+
# French, 'ja-jp' for Japanese, 'ko-kr' for Korean, 'ru-ru' for Russian,
|
52
|
+
# 'pt-br' for Portuguese, 'it-it' for Italian, 'zh-tw' for Chinese and
|
53
|
+
# 'de-de' for German.
|
54
|
+
attr_accessor :preferred_support_language
|
55
|
+
|
56
|
+
|
57
|
+
#
|
58
|
+
# Mapper for UpdateContactProfile class as Ruby Hash.
|
59
|
+
# This will be used for serialization/deserialization.
|
60
|
+
#
|
61
|
+
def self.mapper()
|
62
|
+
{
|
63
|
+
client_side_validation: true,
|
64
|
+
required: false,
|
65
|
+
serialized_name: 'UpdateContactProfile',
|
66
|
+
type: {
|
67
|
+
name: 'Composite',
|
68
|
+
class_name: 'UpdateContactProfile',
|
69
|
+
model_properties: {
|
70
|
+
first_name: {
|
71
|
+
client_side_validation: true,
|
72
|
+
required: false,
|
73
|
+
serialized_name: 'firstName',
|
74
|
+
type: {
|
75
|
+
name: 'String'
|
76
|
+
}
|
77
|
+
},
|
78
|
+
last_name: {
|
79
|
+
client_side_validation: true,
|
80
|
+
required: false,
|
81
|
+
serialized_name: 'lastName',
|
82
|
+
type: {
|
83
|
+
name: 'String'
|
84
|
+
}
|
85
|
+
},
|
86
|
+
preferred_contact_method: {
|
87
|
+
client_side_validation: true,
|
88
|
+
required: false,
|
89
|
+
serialized_name: 'preferredContactMethod',
|
90
|
+
type: {
|
91
|
+
name: 'String'
|
92
|
+
}
|
93
|
+
},
|
94
|
+
primary_email_address: {
|
95
|
+
client_side_validation: true,
|
96
|
+
required: false,
|
97
|
+
serialized_name: 'primaryEmailAddress',
|
98
|
+
type: {
|
99
|
+
name: 'String'
|
100
|
+
}
|
101
|
+
},
|
102
|
+
additional_email_addresses: {
|
103
|
+
client_side_validation: true,
|
104
|
+
required: false,
|
105
|
+
serialized_name: 'additionalEmailAddresses',
|
106
|
+
type: {
|
107
|
+
name: 'Sequence',
|
108
|
+
element: {
|
109
|
+
client_side_validation: true,
|
110
|
+
required: false,
|
111
|
+
serialized_name: 'StringElementType',
|
112
|
+
type: {
|
113
|
+
name: 'String'
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
},
|
118
|
+
phone_number: {
|
119
|
+
client_side_validation: true,
|
120
|
+
required: false,
|
121
|
+
serialized_name: 'phoneNumber',
|
122
|
+
type: {
|
123
|
+
name: 'String'
|
124
|
+
}
|
125
|
+
},
|
126
|
+
preferred_time_zone: {
|
127
|
+
client_side_validation: true,
|
128
|
+
required: false,
|
129
|
+
serialized_name: 'preferredTimeZone',
|
130
|
+
type: {
|
131
|
+
name: 'String'
|
132
|
+
}
|
133
|
+
},
|
134
|
+
country: {
|
135
|
+
client_side_validation: true,
|
136
|
+
required: false,
|
137
|
+
serialized_name: 'country',
|
138
|
+
type: {
|
139
|
+
name: 'String'
|
140
|
+
}
|
141
|
+
},
|
142
|
+
preferred_support_language: {
|
143
|
+
client_side_validation: true,
|
144
|
+
required: false,
|
145
|
+
serialized_name: 'preferredSupportLanguage',
|
146
|
+
type: {
|
147
|
+
name: 'String'
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}
|
151
|
+
}
|
152
|
+
}
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
end
|
@@ -0,0 +1,73 @@
|
|
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::Support::Mgmt::V2020_04_01
|
7
|
+
module Models
|
8
|
+
#
|
9
|
+
# Updates severity, ticket status, and contact details in the support
|
10
|
+
# ticket.
|
11
|
+
#
|
12
|
+
class UpdateSupportTicket
|
13
|
+
|
14
|
+
include MsRestAzure
|
15
|
+
|
16
|
+
# @return [SeverityLevel] Severity level. Possible values include:
|
17
|
+
# 'minimal', 'moderate', 'critical', 'highestcriticalimpact'
|
18
|
+
attr_accessor :severity
|
19
|
+
|
20
|
+
# @return [Status] Status to be updated on the ticket. Possible values
|
21
|
+
# include: 'open', 'closed'
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
# @return [UpdateContactProfile] Contact details to be updated on the
|
25
|
+
# support ticket.
|
26
|
+
attr_accessor :contact_details
|
27
|
+
|
28
|
+
|
29
|
+
#
|
30
|
+
# Mapper for UpdateSupportTicket class as Ruby Hash.
|
31
|
+
# This will be used for serialization/deserialization.
|
32
|
+
#
|
33
|
+
def self.mapper()
|
34
|
+
{
|
35
|
+
client_side_validation: true,
|
36
|
+
required: false,
|
37
|
+
serialized_name: 'UpdateSupportTicket',
|
38
|
+
type: {
|
39
|
+
name: 'Composite',
|
40
|
+
class_name: 'UpdateSupportTicket',
|
41
|
+
model_properties: {
|
42
|
+
severity: {
|
43
|
+
client_side_validation: true,
|
44
|
+
required: false,
|
45
|
+
serialized_name: 'severity',
|
46
|
+
type: {
|
47
|
+
name: 'String'
|
48
|
+
}
|
49
|
+
},
|
50
|
+
status: {
|
51
|
+
client_side_validation: true,
|
52
|
+
required: false,
|
53
|
+
serialized_name: 'status',
|
54
|
+
type: {
|
55
|
+
name: 'String'
|
56
|
+
}
|
57
|
+
},
|
58
|
+
contact_details: {
|
59
|
+
client_side_validation: true,
|
60
|
+
required: false,
|
61
|
+
serialized_name: 'contactDetails',
|
62
|
+
type: {
|
63
|
+
name: 'Composite',
|
64
|
+
class_name: 'UpdateContactProfile'
|
65
|
+
}
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
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::Support end
|
8
|
+
module Azure::Support::Mgmt end
|
9
|
+
module Azure::Support::Mgmt::V2020_04_01 end
|
@@ -0,0 +1,109 @@
|
|
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::Support::Mgmt::V2020_04_01
|
7
|
+
#
|
8
|
+
# Microsoft Azure Support Resource Provider.
|
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 [MicrosoftSupport] reference to the MicrosoftSupport
|
22
|
+
attr_reader :client
|
23
|
+
|
24
|
+
#
|
25
|
+
# This lists all the available Microsoft Support 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 [OperationsListResult] operation results.
|
31
|
+
#
|
32
|
+
def list(custom_headers:nil)
|
33
|
+
response = list_async(custom_headers:custom_headers).value!
|
34
|
+
response.body unless response.nil?
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# This lists all the available Microsoft Support 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
|
+
# This lists all the available Microsoft Support 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.Support/operations'
|
68
|
+
|
69
|
+
request_url = @base_url || @client.base_url
|
70
|
+
|
71
|
+
options = {
|
72
|
+
middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
|
73
|
+
query_params: {'api-version' => @client.api_version},
|
74
|
+
headers: request_headers.merge(custom_headers || {}),
|
75
|
+
base_url: request_url
|
76
|
+
}
|
77
|
+
promise = @client.make_request_async(:get, path_template, options)
|
78
|
+
|
79
|
+
promise = promise.then do |result|
|
80
|
+
http_response = result.response
|
81
|
+
status_code = http_response.status
|
82
|
+
response_content = http_response.body
|
83
|
+
unless status_code == 200
|
84
|
+
error_model = JSON.load(response_content)
|
85
|
+
fail MsRest::HttpOperationError.new(result.request, http_response, error_model)
|
86
|
+
end
|
87
|
+
|
88
|
+
result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
|
89
|
+
result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
|
90
|
+
result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
|
91
|
+
# Deserialize Response
|
92
|
+
if status_code == 200
|
93
|
+
begin
|
94
|
+
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
|
95
|
+
result_mapper = Azure::Support::Mgmt::V2020_04_01::Models::OperationsListResult.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
|
+
end
|
109
|
+
end
|