haipa_compute 0.0.3 → 0.1.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.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/1.0/generated/haipa_compute/haipa_compute.rb +136 -136
  3. data/lib/1.0/generated/haipa_compute/machines.rb +578 -578
  4. data/lib/1.0/generated/haipa_compute/models/agent.rb +87 -87
  5. data/lib/1.0/generated/haipa_compute/models/agent_network.rb +93 -93
  6. data/lib/1.0/generated/haipa_compute/models/machine.rb +125 -125
  7. data/lib/1.0/generated/haipa_compute/models/machine_config.rb +102 -91
  8. data/lib/1.0/generated/haipa_compute/models/machine_network.rb +187 -187
  9. data/lib/1.0/generated/haipa_compute/models/machine_network_config.rb +67 -67
  10. data/lib/1.0/generated/haipa_compute/models/machine_subnet_config.rb +47 -47
  11. data/lib/1.0/generated/haipa_compute/models/network.rb +109 -109
  12. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_machine.rb +56 -56
  13. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_operation.rb +56 -56
  14. data/lib/1.0/generated/haipa_compute/models/odata_value_ienumerable_operation_log.rb +56 -56
  15. data/lib/1.0/generated/haipa_compute/models/operation.rb +123 -123
  16. data/lib/1.0/generated/haipa_compute/models/operation_log.rb +81 -81
  17. data/lib/1.0/generated/haipa_compute/models/subnet.rb +144 -144
  18. data/lib/1.0/generated/haipa_compute/models/virtual_machine.rb +90 -90
  19. data/lib/1.0/generated/haipa_compute/models/virtual_machine_config.rb +111 -111
  20. data/lib/1.0/generated/haipa_compute/models/virtual_machine_cpu_config.rb +47 -47
  21. data/lib/1.0/generated/haipa_compute/models/virtual_machine_disk_config.rb +80 -80
  22. data/lib/1.0/generated/haipa_compute/models/virtual_machine_memory_config.rb +69 -69
  23. data/lib/1.0/generated/haipa_compute/models/virtual_machine_network_adapter.rb +92 -92
  24. data/lib/1.0/generated/haipa_compute/models/virtual_machine_network_adapter_config.rb +69 -69
  25. data/lib/1.0/generated/haipa_compute/models/virtual_machine_provisioning_config.rb +58 -58
  26. data/lib/1.0/generated/haipa_compute/module_definition.rb +9 -9
  27. data/lib/1.0/generated/haipa_compute/networks.rb +415 -415
  28. data/lib/1.0/generated/haipa_compute/operations.rb +347 -347
  29. data/lib/1.0/generated/haipa_compute/subnets.rb +100 -100
  30. data/lib/1.0/generated/haipa_compute.rb +53 -53
  31. data/lib/api_configuration.rb +2 -1
  32. data/lib/version.rb +1 -1
  33. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81718a96e2798f45f5d69f73d4eb6a3876674ed2d22468ae00b743079f37ef16
4
- data.tar.gz: 4a7d73f484728be6be0ec018811b527e483b1dc194df6c3548b0088bc392a98a
3
+ metadata.gz: 9b38cbb70108d7ecc999a6c4aa4686b36613a698da2fb30780313dfee1388c76
4
+ data.tar.gz: 7be9dc66d64ef79fe6f7d1d073e54f65a9b05e9c6c3d765c49a1319962325b50
5
5
  SHA512:
6
- metadata.gz: eb260378b7f54b3e7b50f4874046461ccea526d2f1c705e4f8c1006d3c9032eca69384c430a1313c62dd411da1a2f7975ba191d3eac0c434797810a846a88011
7
- data.tar.gz: b59a5c89696e98c754a6e9fc82f60370518ac69fdc8189f73992330f54e24daff67042811b04eba7fc14142955c4393097b1646e5e60c9ef456e0a94f282435c
6
+ metadata.gz: 64ea3ef660fc146f1420402d10aed77692593d2d07638ec41efe1a180bd070d8649188e317d40b761f3d22f26bc08fe6c287d0aa21f53c883b9c9d7bf130ca82
7
+ data.tar.gz: 35c42064cd45cf0a83dfd9f139638ca09d585864006aa37cc83e0c4b9e8b191225ac8c94a4c22d85f5fd8ceea2e181ac7f639f639af2fe8eed4357184b71ffc1
@@ -1,136 +1,136 @@
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 Haipa::Client::Compute::V1_0
7
- #
8
- # A service client - single point of access to the REST API.
9
- #
10
- class HaipaCompute < Haipa::Client::HaipaServiceClient
11
- include Haipa::Client
12
- include Haipa::Client::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] The preferred language for the response.
21
- attr_accessor :accept_language
22
-
23
- # @return [Integer] The retry timeout in seconds for Long Running
24
- # Operations. Default value is 30.
25
- attr_accessor :long_running_operation_retry_timeout
26
-
27
- # @return [Boolean] Whether a unique x-ms-client-request-id should be
28
- # generated. When set to true a unique x-ms-client-request-id value is
29
- # generated and included in each request. Default is true.
30
- attr_accessor :generate_client_request_id
31
-
32
- # @return [Machines] machines
33
- attr_reader :machines
34
-
35
- # @return [Networks] networks
36
- attr_reader :networks
37
-
38
- # @return [Operations] operations
39
- attr_reader :operations
40
-
41
- # @return [Subnets] subnets
42
- attr_reader :subnets
43
-
44
- #
45
- # Creates initializes a new instance of the HaipaCompute class.
46
- # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
47
- # @param base_url [String] the base URI of the service.
48
- # @param options [Array] filters to be applied to the HTTP requests.
49
- #
50
- def initialize(credentials = nil, base_url = nil, options = nil)
51
- super(credentials, options)
52
- @base_url = base_url || 'http://localhost/api'
53
-
54
- fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
55
- @credentials = credentials
56
-
57
- @machines = Machines.new(self)
58
- @networks = Networks.new(self)
59
- @operations = Operations.new(self)
60
- @subnets = Subnets.new(self)
61
- @accept_language = 'en-US'
62
- @long_running_operation_retry_timeout = 30
63
- @generate_client_request_id = true
64
- add_telemetry
65
- end
66
-
67
- #
68
- # Makes a request and returns the body of the response.
69
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
70
- # @param path [String] the path, relative to {base_url}.
71
- # @param options [Hash{String=>String}] specifying any request options like :body.
72
- # @return [Hash{String=>String}] containing the body of the response.
73
- # Example:
74
- #
75
- # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
76
- # path = "/path"
77
- # options = {
78
- # body: request_content,
79
- # query_params: {'api-version' => '2016-02-01'}
80
- # }
81
- # result = @client.make_request(:put, path, options)
82
- #
83
- def make_request(method, path, options = {})
84
- result = make_request_with_http_info(method, path, options)
85
- result.body unless result.nil?
86
- end
87
-
88
- #
89
- # Makes a request and returns the operation response.
90
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
- # @param path [String] the path, relative to {base_url}.
92
- # @param options [Hash{String=>String}] specifying any request options like :body.
93
- # @return [Haipa::Client::HaipaOperationResponse] Operation response containing the request, response and status.
94
- #
95
- def make_request_with_http_info(method, path, options = {})
96
- result = make_request_async(method, path, options).value!
97
- result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
98
- result
99
- end
100
-
101
- #
102
- # Makes a request asynchronously.
103
- # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
104
- # @param path [String] the path, relative to {base_url}.
105
- # @param options [Hash{String=>String}] specifying any request options like :body.
106
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
107
- #
108
- def make_request_async(method, path, options = {})
109
- fail ArgumentError, 'method is nil' if method.nil?
110
- fail ArgumentError, 'path is nil' if path.nil?
111
-
112
- request_url = options[:base_url] || @base_url
113
- if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
114
- @request_headers['Content-Type'] = options[:headers]['Content-Type']
115
- end
116
-
117
- request_headers = @request_headers
118
- request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
119
- options.merge!({headers: request_headers.merge(options[:headers] || {})})
120
- options.merge!({credentials: @credentials}) unless @credentials.nil?
121
-
122
- super(request_url, method, path, options)
123
- end
124
-
125
-
126
- private
127
- #
128
- # Adds telemetry information.
129
- #
130
- def add_telemetry
131
- sdk_information = 'haipa_compute'
132
- sdk_information = "#{sdk_information}/0.0.1"
133
- add_user_agent_information(sdk_information)
134
- end
135
- end
136
- end
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 Haipa::Client::Compute::V1_0
7
+ #
8
+ # A service client - single point of access to the REST API.
9
+ #
10
+ class HaipaCompute < Haipa::Client::HaipaServiceClient
11
+ include Haipa::Client
12
+ include Haipa::Client::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] The preferred language for the response.
21
+ attr_accessor :accept_language
22
+
23
+ # @return [Integer] The retry timeout in seconds for Long Running
24
+ # Operations. Default value is 30.
25
+ attr_accessor :long_running_operation_retry_timeout
26
+
27
+ # @return [Boolean] Whether a unique x-ms-client-request-id should be
28
+ # generated. When set to true a unique x-ms-client-request-id value is
29
+ # generated and included in each request. Default is true.
30
+ attr_accessor :generate_client_request_id
31
+
32
+ # @return [Machines] machines
33
+ attr_reader :machines
34
+
35
+ # @return [Networks] networks
36
+ attr_reader :networks
37
+
38
+ # @return [Operations] operations
39
+ attr_reader :operations
40
+
41
+ # @return [Subnets] subnets
42
+ attr_reader :subnets
43
+
44
+ #
45
+ # Creates initializes a new instance of the HaipaCompute class.
46
+ # @param credentials [MsRest::ServiceClientCredentials] credentials to authorize HTTP requests made by the service client.
47
+ # @param base_url [String] the base URI of the service.
48
+ # @param options [Array] filters to be applied to the HTTP requests.
49
+ #
50
+ def initialize(credentials = nil, base_url = nil, options = nil)
51
+ super(credentials, options)
52
+ @base_url = base_url || 'http://localhost/api'
53
+
54
+ fail ArgumentError, 'invalid type of credentials input parameter' unless credentials.is_a?(MsRest::ServiceClientCredentials) unless credentials.nil?
55
+ @credentials = credentials
56
+
57
+ @machines = Machines.new(self)
58
+ @networks = Networks.new(self)
59
+ @operations = Operations.new(self)
60
+ @subnets = Subnets.new(self)
61
+ @accept_language = 'en-US'
62
+ @long_running_operation_retry_timeout = 30
63
+ @generate_client_request_id = true
64
+ add_telemetry
65
+ end
66
+
67
+ #
68
+ # Makes a request and returns the body of the response.
69
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
70
+ # @param path [String] the path, relative to {base_url}.
71
+ # @param options [Hash{String=>String}] specifying any request options like :body.
72
+ # @return [Hash{String=>String}] containing the body of the response.
73
+ # Example:
74
+ #
75
+ # request_content = "{'location':'westus','tags':{'tag1':'val1','tag2':'val2'}}"
76
+ # path = "/path"
77
+ # options = {
78
+ # body: request_content,
79
+ # query_params: {'api-version' => '2016-02-01'}
80
+ # }
81
+ # result = @client.make_request(:put, path, options)
82
+ #
83
+ def make_request(method, path, options = {})
84
+ result = make_request_with_http_info(method, path, options)
85
+ result.body unless result.nil?
86
+ end
87
+
88
+ #
89
+ # Makes a request and returns the operation response.
90
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
91
+ # @param path [String] the path, relative to {base_url}.
92
+ # @param options [Hash{String=>String}] specifying any request options like :body.
93
+ # @return [Haipa::Client::HaipaOperationResponse] Operation response containing the request, response and status.
94
+ #
95
+ def make_request_with_http_info(method, path, options = {})
96
+ result = make_request_async(method, path, options).value!
97
+ result.body = result.response.body.to_s.empty? ? nil : JSON.load(result.response.body)
98
+ result
99
+ end
100
+
101
+ #
102
+ # Makes a request asynchronously.
103
+ # @param method [Symbol] with any of the following values :get, :put, :post, :patch, :delete.
104
+ # @param path [String] the path, relative to {base_url}.
105
+ # @param options [Hash{String=>String}] specifying any request options like :body.
106
+ # @return [Concurrent::Promise] Promise object which holds the HTTP response.
107
+ #
108
+ def make_request_async(method, path, options = {})
109
+ fail ArgumentError, 'method is nil' if method.nil?
110
+ fail ArgumentError, 'path is nil' if path.nil?
111
+
112
+ request_url = options[:base_url] || @base_url
113
+ if(!options[:headers].nil? && !options[:headers]['Content-Type'].nil?)
114
+ @request_headers['Content-Type'] = options[:headers]['Content-Type']
115
+ end
116
+
117
+ request_headers = @request_headers
118
+ request_headers.merge!({'accept-language' => @accept_language}) unless @accept_language.nil?
119
+ options.merge!({headers: request_headers.merge(options[:headers] || {})})
120
+ options.merge!({credentials: @credentials}) unless @credentials.nil?
121
+
122
+ super(request_url, method, path, options)
123
+ end
124
+
125
+
126
+ private
127
+ #
128
+ # Adds telemetry information.
129
+ #
130
+ def add_telemetry
131
+ sdk_information = 'haipa_compute'
132
+ sdk_information = "#{sdk_information}/0.0.1"
133
+ add_user_agent_information(sdk_information)
134
+ end
135
+ end
136
+ end