azure_mgmt_support 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/lib/2020-04-01/generated/azure_mgmt_support.rb +62 -0
  4. data/lib/2020-04-01/generated/azure_mgmt_support/communications.rb +661 -0
  5. data/lib/2020-04-01/generated/azure_mgmt_support/microsoft_support.rb +147 -0
  6. data/lib/2020-04-01/generated/azure_mgmt_support/models/check_name_availability_input.rb +59 -0
  7. data/lib/2020-04-01/generated/azure_mgmt_support/models/check_name_availability_output.rb +72 -0
  8. data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_details.rb +145 -0
  9. data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_direction.rb +16 -0
  10. data/lib/2020-04-01/generated/azure_mgmt_support/models/communication_type.rb +16 -0
  11. data/lib/2020-04-01/generated/azure_mgmt_support/models/communications_list_result.rb +99 -0
  12. data/lib/2020-04-01/generated/azure_mgmt_support/models/contact_profile.rb +156 -0
  13. data/lib/2020-04-01/generated/azure_mgmt_support/models/exception_response.rb +47 -0
  14. data/lib/2020-04-01/generated/azure_mgmt_support/models/operation.rb +59 -0
  15. data/lib/2020-04-01/generated/azure_mgmt_support/models/operation_display.rb +84 -0
  16. data/lib/2020-04-01/generated/azure_mgmt_support/models/operations_list_result.rb +56 -0
  17. data/lib/2020-04-01/generated/azure_mgmt_support/models/preferred_contact_method.rb +16 -0
  18. data/lib/2020-04-01/generated/azure_mgmt_support/models/problem_classification.rb +83 -0
  19. data/lib/2020-04-01/generated/azure_mgmt_support/models/problem_classifications_list_result.rb +56 -0
  20. data/lib/2020-04-01/generated/azure_mgmt_support/models/quota_change_request.rb +58 -0
  21. data/lib/2020-04-01/generated/azure_mgmt_support/models/quota_ticket_details.rb +82 -0
  22. data/lib/2020-04-01/generated/azure_mgmt_support/models/service.rb +101 -0
  23. data/lib/2020-04-01/generated/azure_mgmt_support/models/service_error.rb +89 -0
  24. data/lib/2020-04-01/generated/azure_mgmt_support/models/service_error_detail.rb +70 -0
  25. data/lib/2020-04-01/generated/azure_mgmt_support/models/service_level_agreement.rb +73 -0
  26. data/lib/2020-04-01/generated/azure_mgmt_support/models/services_list_result.rb +55 -0
  27. data/lib/2020-04-01/generated/azure_mgmt_support/models/severity_level.rb +18 -0
  28. data/lib/2020-04-01/generated/azure_mgmt_support/models/status.rb +16 -0
  29. data/lib/2020-04-01/generated/azure_mgmt_support/models/support_engineer.rb +48 -0
  30. data/lib/2020-04-01/generated/azure_mgmt_support/models/support_ticket_details.rb +321 -0
  31. data/lib/2020-04-01/generated/azure_mgmt_support/models/support_tickets_list_result.rb +99 -0
  32. data/lib/2020-04-01/generated/azure_mgmt_support/models/technical_ticket_details.rb +48 -0
  33. data/lib/2020-04-01/generated/azure_mgmt_support/models/type.rb +16 -0
  34. data/lib/2020-04-01/generated/azure_mgmt_support/models/update_contact_profile.rb +156 -0
  35. data/lib/2020-04-01/generated/azure_mgmt_support/models/update_support_ticket.rb +73 -0
  36. data/lib/2020-04-01/generated/azure_mgmt_support/module_definition.rb +9 -0
  37. data/lib/2020-04-01/generated/azure_mgmt_support/operations.rb +109 -0
  38. data/lib/2020-04-01/generated/azure_mgmt_support/problem_classifications.rb +219 -0
  39. data/lib/2020-04-01/generated/azure_mgmt_support/services.rb +222 -0
  40. data/lib/2020-04-01/generated/azure_mgmt_support/support_tickets.rb +854 -0
  41. data/lib/azure_mgmt_support.rb +6 -0
  42. data/lib/module_definition.rb +7 -0
  43. data/lib/profiles/latest/modules/support_profile_module.rb +189 -0
  44. data/lib/profiles/latest/support_latest_profile_client.rb +40 -0
  45. data/lib/profiles/latest/support_module_definition.rb +8 -0
  46. data/lib/version.rb +7 -0
  47. metadata +162 -0
@@ -0,0 +1,147 @@
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
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class MicrosoftSupport < MsRestAzure::AzureServiceClient
11
+ include MsRestAzure
12
+ include MsRestAzure::Serialization
13
+
14
+ # @return [String] the base URI of the service.
15
+ attr_accessor :base_url
16
+
17
+ # @return Credentials needed for the client to connect to Azure.
18
+ attr_reader :credentials
19
+
20
+ # @return [String] Azure subscription Id.
21
+ attr_accessor :subscription_id
22
+
23
+ # @return [String] API version.
24
+ attr_reader :api_version
25
+
26
+ # @return [String] The preferred language for the response.
27
+ attr_accessor :accept_language
28
+
29
+ # @return [Integer] The retry timeout in seconds for Long Running
30
+ # Operations. Default value is 30.
31
+ attr_accessor :long_running_operation_retry_timeout
32
+
33
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
34
+ # generated. When set to true a unique x-ms-client-request-id value is
35
+ # generated and included in each request. Default is true.
36
+ attr_accessor :generate_client_request_id
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [Services] services
42
+ attr_reader :services
43
+
44
+ # @return [ProblemClassifications] problem_classifications
45
+ attr_reader :problem_classifications
46
+
47
+ # @return [SupportTickets] support_tickets
48
+ attr_reader :support_tickets
49
+
50
+ # @return [Communications] communications
51
+ attr_reader :communications
52
+
53
+ #
54
+ # Creates initializes a new instance of the MicrosoftSupport class.
55
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
56
+ # @param base_url [String] the base URI of the service.
57
+ # @param options [Array] filters to be applied to the HTTP requests.
58
+ #
59
+ def initialize(credentials = nil, base_url = nil, options = nil)
60
+ super(credentials, options)
61
+ @base_url = base_url || 'https://management.azure.com'
62
+
63
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
64
+ @credentials = credentials
65
+
66
+ @operations = Operations.new(self)
67
+ @services = Services.new(self)
68
+ @problem_classifications = ProblemClassifications.new(self)
69
+ @support_tickets = SupportTickets.new(self)
70
+ @communications = Communications.new(self)
71
+ @api_version = '2020-04-01'
72
+ @accept_language = 'en-US'
73
+ @long_running_operation_retry_timeout = 30
74
+ @generate_client_request_id = true
75
+ add_telemetry
76
+ end
77
+
78
+ #
79
+ # Makes a request and returns the body of the response.
80
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
81
+ # @param path [String] the path, relative to {base_url}.
82
+ # @param options [Hash{String=>String}] specifying any request options like :body.
83
+ # @return [Hash{String=>String}] containing the body of the response.
84
+ # Example:
85
+ #
86
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
87
+ # path = "/path"
88
+ # options = {
89
+ # body: request_content,
90
+ # query_params: {'api-version' => '2016-02-01'}
91
+ # }
92
+ # result = @client.make_request(:put, path, options)
93
+ #
94
+ def make_request(method, path, options = {})
95
+ result = make_request_with_http_info(method, path, options)
96
+ result.body unless result.nil?
97
+ end
98
+
99
+ #
100
+ # Makes a request and returns the operation response.
101
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
102
+ # @param path [String] the path, relative to {base_url}.
103
+ # @param options [Hash{String=>String}] specifying any request options like :body.
104
+ # @return [MsRestAzure::AzureOperationResponse] Operation response containing the request, response and status.
105
+ #
106
+ def make_request_with_http_info(method, path, options = {})
107
+ result = make_request_async(method, path, options).value!
108
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
109
+ result
110
+ end
111
+
112
+ #
113
+ # Makes a request asynchronously.
114
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
115
+ # @param path [String] the path, relative to {base_url}.
116
+ # @param options [Hash{String=>String}] specifying any request options like :body.
117
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
118
+ #
119
+ def make_request_async(method, path, options = {})
120
+ fail ArgumentError, 'method is nil' if method.nil?
121
+ fail ArgumentError, 'path is nil' if path.nil?
122
+
123
+ request_url = options[:base_url] || @base_url
124
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
125
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
126
+ end
127
+
128
+ request_headers = @request_headers
129
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
130
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
131
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
132
+
133
+ super(request_url, method, path, options)
134
+ end
135
+
136
+
137
+ private
138
+ #
139
+ # Adds telemetry information.
140
+ #
141
+ def add_telemetry
142
+ sdk_information = 'azure_mgmt_support'
143
+ sdk_information = "#{sdk_information}/0.17.0"
144
+ add_user_agent_information(sdk_information)
145
+ end
146
+ end
147
+ 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::Support::Mgmt::V2020_04_01
7
+ module Models
8
+ #
9
+ # Input of CheckNameAvailability API.
10
+ #
11
+ class CheckNameAvailabilityInput
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] The resource name to validate.
16
+ attr_accessor :name
17
+
18
+ # @return [Type] The type of resource. Possible values include:
19
+ # 'Microsoft.Support/supportTickets', 'Microsoft.Support/communications'
20
+ attr_accessor :type
21
+
22
+
23
+ #
24
+ # Mapper for CheckNameAvailabilityInput 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: 'CheckNameAvailabilityInput',
32
+ type: {
33
+ name: 'Composite',
34
+ class_name: 'CheckNameAvailabilityInput',
35
+ model_properties: {
36
+ name: {
37
+ client_side_validation: true,
38
+ required: true,
39
+ serialized_name: 'name',
40
+ type: {
41
+ name: 'String'
42
+ }
43
+ },
44
+ type: {
45
+ client_side_validation: true,
46
+ required: true,
47
+ serialized_name: 'type',
48
+ type: {
49
+ name: 'Enum',
50
+ module: 'Type'
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ end
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,72 @@
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
+ # Output of check name availability API.
10
+ #
11
+ class CheckNameAvailabilityOutput
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [Boolean] Indicates whether the name is available.
16
+ attr_accessor :name_available
17
+
18
+ # @return [String] The reason why the name is not available.
19
+ attr_accessor :reason
20
+
21
+ # @return [String] The detailed error message describing why the name is
22
+ # not available.
23
+ attr_accessor :message
24
+
25
+
26
+ #
27
+ # Mapper for CheckNameAvailabilityOutput 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: 'CheckNameAvailabilityOutput',
35
+ type: {
36
+ name: 'Composite',
37
+ class_name: 'CheckNameAvailabilityOutput',
38
+ model_properties: {
39
+ name_available: {
40
+ client_side_validation: true,
41
+ required: false,
42
+ read_only: true,
43
+ serialized_name: 'nameAvailable',
44
+ type: {
45
+ name: 'Boolean'
46
+ }
47
+ },
48
+ reason: {
49
+ client_side_validation: true,
50
+ required: false,
51
+ read_only: true,
52
+ serialized_name: 'reason',
53
+ type: {
54
+ name: 'String'
55
+ }
56
+ },
57
+ message: {
58
+ client_side_validation: true,
59
+ required: false,
60
+ read_only: true,
61
+ serialized_name: 'message',
62
+ type: {
63
+ name: 'String'
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,145 @@
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 Communication resource.
10
+ #
11
+ class CommunicationDetails
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [String] Id of the resource.
16
+ attr_accessor :id
17
+
18
+ # @return [String] Name of the resource.
19
+ attr_accessor :name
20
+
21
+ # @return [String] Type of the resource
22
+ # 'Microsoft.Support/communications'.
23
+ attr_accessor :type
24
+
25
+ # @return [CommunicationType] Communication type. Possible values
26
+ # include: 'web', 'phone'
27
+ attr_accessor :communication_type
28
+
29
+ # @return [CommunicationDirection] Direction of communication. Possible
30
+ # values include: 'inbound', 'outbound'
31
+ attr_accessor :communication_direction
32
+
33
+ # @return [String] Email address of the sender. This property is required
34
+ # if called by a service principal.
35
+ attr_accessor :sender
36
+
37
+ # @return [String] Subject of the communication.
38
+ attr_accessor :subject
39
+
40
+ # @return [String] Body of the communication.
41
+ attr_accessor :body
42
+
43
+ # @return [DateTime] Time in UTC (ISO 8601 format) when the communication
44
+ # was created.
45
+ attr_accessor :created_date
46
+
47
+
48
+ #
49
+ # Mapper for CommunicationDetails class as Ruby Hash.
50
+ # This will be used for serialization/deserialization.
51
+ #
52
+ def self.mapper()
53
+ {
54
+ client_side_validation: true,
55
+ required: false,
56
+ serialized_name: 'CommunicationDetails',
57
+ type: {
58
+ name: 'Composite',
59
+ class_name: 'CommunicationDetails',
60
+ model_properties: {
61
+ id: {
62
+ client_side_validation: true,
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'id',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ name: {
71
+ client_side_validation: true,
72
+ required: false,
73
+ read_only: true,
74
+ serialized_name: 'name',
75
+ type: {
76
+ name: 'String'
77
+ }
78
+ },
79
+ type: {
80
+ client_side_validation: true,
81
+ required: false,
82
+ read_only: true,
83
+ serialized_name: 'type',
84
+ type: {
85
+ name: 'String'
86
+ }
87
+ },
88
+ communication_type: {
89
+ client_side_validation: true,
90
+ required: false,
91
+ read_only: true,
92
+ serialized_name: 'properties.communicationType',
93
+ type: {
94
+ name: 'String'
95
+ }
96
+ },
97
+ communication_direction: {
98
+ client_side_validation: true,
99
+ required: false,
100
+ read_only: true,
101
+ serialized_name: 'properties.communicationDirection',
102
+ type: {
103
+ name: 'String'
104
+ }
105
+ },
106
+ sender: {
107
+ client_side_validation: true,
108
+ required: false,
109
+ serialized_name: 'properties.sender',
110
+ type: {
111
+ name: 'String'
112
+ }
113
+ },
114
+ subject: {
115
+ client_side_validation: true,
116
+ required: true,
117
+ serialized_name: 'properties.subject',
118
+ type: {
119
+ name: 'String'
120
+ }
121
+ },
122
+ body: {
123
+ client_side_validation: true,
124
+ required: true,
125
+ serialized_name: 'properties.body',
126
+ type: {
127
+ name: 'String'
128
+ }
129
+ },
130
+ created_date: {
131
+ client_side_validation: true,
132
+ required: false,
133
+ read_only: true,
134
+ serialized_name: 'properties.createdDate',
135
+ type: {
136
+ name: 'DateTime'
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ end
143
+ end
144
+ end
145
+ 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 CommunicationDirection
10
+ #
11
+ module CommunicationDirection
12
+ Inbound = "inbound"
13
+ Outbound = "outbound"
14
+ end
15
+ end
16
+ 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 CommunicationType
10
+ #
11
+ module CommunicationType
12
+ Web = "web"
13
+ Phone = "phone"
14
+ end
15
+ end
16
+ end