azure_mgmt_cognitive_services 0.18.3 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_cognitive_services
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.3
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-03 00:00:00.000000000 Z
11
+ date: 2020-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -109,7 +109,6 @@ files:
109
109
  - lib/2016-02-01-preview/generated/azure_mgmt_cognitive_services/module_definition.rb
110
110
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services.rb
111
111
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/accounts.rb
112
- - lib/2017-04-18/generated/azure_mgmt_cognitive_services/check_sku_availability.rb
113
112
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/cognitive_services_management_client.rb
114
113
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_parameter.rb
115
114
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/check_domain_availability_result.rb
@@ -117,11 +116,11 @@ files:
117
116
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result.rb
118
117
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/check_sku_availability_result_list.rb
119
118
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account.rb
120
- - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_create_parameters.rb
119
+ - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_api_properties.rb
121
120
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_enumerate_skus_result.rb
122
121
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_keys.rb
123
122
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_list_result.rb
124
- - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_update_parameters.rb
123
+ - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_account_properties.rb
125
124
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/cognitive_services_resource_and_sku.rb
126
125
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/error.rb
127
126
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/error_body.rb
@@ -129,7 +128,6 @@ files:
129
128
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/key_name.rb
130
129
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/metric_name.rb
131
130
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_action.rb
132
- - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_bypass_options.rb
133
131
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/network_rule_set.rb
134
132
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_display_info.rb
135
133
  - lib/2017-04-18/generated/azure_mgmt_cognitive_services/models/operation_entity.rb
@@ -183,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
181
  version: '0'
184
182
  requirements: []
185
183
  rubyforge_project:
186
- rubygems_version: 2.7.6
184
+ rubygems_version: 2.7.8
187
185
  signing_key:
188
186
  specification_version: 4
189
187
  summary: Official Ruby client library to consume Microsoft Azure Cognitive Services
@@ -1,140 +0,0 @@
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::CognitiveServices::Mgmt::V2017_04_18
7
- #
8
- # Cognitive Services Management Client
9
- #
10
- class CheckSkuAvailability
11
- include MsRestAzure
12
-
13
- #
14
- # Creates and initializes a new instance of the CheckSkuAvailability class.
15
- # @param client service class for accessing basic functionality.
16
- #
17
- def initialize(client)
18
- @client = client
19
- end
20
-
21
- # @return [CognitiveServicesManagementClient] reference to the CognitiveServicesManagementClient
22
- attr_reader :client
23
-
24
- #
25
- # Check available SKUs.
26
- #
27
- # @param location [String] Resource location.
28
- # @param skus [Array<String>] The SKU of the resource.
29
- # @param kind [String] The Kind of the resource.
30
- # @param type [String] The Type of the resource.
31
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
32
- # will be added to the HTTP request.
33
- #
34
- # @return [CheckSkuAvailabilityResultList] operation results.
35
- #
36
- def list(location, skus, kind, type, custom_headers:nil)
37
- response = list_async(location, skus, kind, type, custom_headers:custom_headers).value!
38
- response.body unless response.nil?
39
- end
40
-
41
- #
42
- # Check available SKUs.
43
- #
44
- # @param location [String] Resource location.
45
- # @param skus [Array<String>] The SKU of the resource.
46
- # @param kind [String] The Kind of the resource.
47
- # @param type [String] The Type of the resource.
48
- # @param custom_headers [Hash{String => String}] A hash of custom headers that
49
- # will be added to the HTTP request.
50
- #
51
- # @return [MsRestAzure::AzureOperationResponse] HTTP response information.
52
- #
53
- def list_with_http_info(location, skus, kind, type, custom_headers:nil)
54
- list_async(location, skus, kind, type, custom_headers:custom_headers).value!
55
- end
56
-
57
- #
58
- # Check available SKUs.
59
- #
60
- # @param location [String] Resource location.
61
- # @param skus [Array<String>] The SKU of the resource.
62
- # @param kind [String] The Kind of the resource.
63
- # @param type [String] The Type of the resource.
64
- # @param [Hash{String => String}] A hash of custom headers that will be added
65
- # to the HTTP request.
66
- #
67
- # @return [Concurrent::Promise] Promise object which holds the HTTP response.
68
- #
69
- def list_async(location, skus, kind, type, custom_headers:nil)
70
- fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
71
- fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
72
- fail ArgumentError, 'location is nil' if location.nil?
73
- fail ArgumentError, 'skus is nil' if skus.nil?
74
- fail ArgumentError, 'kind is nil' if kind.nil?
75
- fail ArgumentError, 'type is nil' if type.nil?
76
-
77
- parameters = CheckSkuAvailabilityParameter.new
78
- unless skus.nil? && kind.nil? && type.nil?
79
- parameters.skus = skus
80
- parameters.kind = kind
81
- parameters.type = type
82
- end
83
-
84
- request_headers = {}
85
- request_headers['Content-Type'] = 'application/json; charset=utf-8'
86
-
87
- # Set Headers
88
- request_headers['x-ms-client-request-id'] = SecureRandom.uuid
89
- request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
90
-
91
- # Serialize Request
92
- request_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityParameter.mapper()
93
- request_content = @client.serialize(request_mapper, parameters)
94
- request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
95
-
96
- path_template = 'subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/checkSkuAvailability'
97
-
98
- request_url = @base_url || @client.base_url
99
-
100
- options = {
101
- middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
102
- path_params: {'subscriptionId' => @client.subscription_id,'location' => location},
103
- query_params: {'api-version' => @client.api_version},
104
- body: request_content,
105
- headers: request_headers.merge(custom_headers || {}),
106
- base_url: request_url
107
- }
108
- promise = @client.make_request_async(:post, path_template, options)
109
-
110
- promise = promise.then do |result|
111
- http_response = result.response
112
- status_code = http_response.status
113
- response_content = http_response.body
114
- unless status_code == 200
115
- error_model = JSON.load(response_content)
116
- fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
117
- end
118
-
119
- result.request_id = http_response['x-ms-request-id'] unless http_response['x-ms-request-id'].nil?
120
- result.correlation_request_id = http_response['x-ms-correlation-request-id'] unless http_response['x-ms-correlation-request-id'].nil?
121
- result.client_request_id = http_response['x-ms-client-request-id'] unless http_response['x-ms-client-request-id'].nil?
122
- # Deserialize Response
123
- if status_code == 200
124
- begin
125
- parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
126
- result_mapper = Azure::CognitiveServices::Mgmt::V2017_04_18::Models::CheckSkuAvailabilityResultList.mapper()
127
- result.body = @client.deserialize(result_mapper, parsed_response)
128
- rescue Exception => e
129
- fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
130
- end
131
- end
132
-
133
- result
134
- end
135
-
136
- promise.execute
137
- end
138
-
139
- end
140
- end
@@ -1,108 +0,0 @@
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::CognitiveServices::Mgmt::V2017_04_18
7
- module Models
8
- #
9
- # The parameters to provide for the account.
10
- #
11
- class CognitiveServicesAccountCreateParameters
12
-
13
- include MsRestAzure
14
-
15
- # @return [Sku] Required. Gets or sets the SKU of the resource.
16
- attr_accessor :sku
17
-
18
- # @return [String] Required. Gets or sets the Kind of the resource.
19
- attr_accessor :kind
20
-
21
- # @return [String] Required. Gets or sets the location of the resource.
22
- # This will be one of the supported and registered Azure Geo Regions
23
- # (e.g. West US, East US, Southeast Asia, etc.). The geo region of a
24
- # resource cannot be changed once it is created, but if an identical geo
25
- # region is specified on update the request will succeed.
26
- attr_accessor :location
27
-
28
- # @return [Hash{String => String}] Gets or sets a list of key value pairs
29
- # that describe the resource. These tags can be used in viewing and
30
- # grouping this resource (across resource groups). A maximum of 15 tags
31
- # can be provided for a resource. Each tag must have a key no greater
32
- # than 128 characters and value no greater than 256 characters.
33
- attr_accessor :tags
34
-
35
- # @return Must exist in the request. Must be an empty object. Must not be
36
- # null.
37
- attr_accessor :properties
38
-
39
-
40
- #
41
- # Mapper for CognitiveServicesAccountCreateParameters class as Ruby Hash.
42
- # This will be used for serialization/deserialization.
43
- #
44
- def self.mapper()
45
- {
46
- client_side_validation: true,
47
- required: false,
48
- serialized_name: 'CognitiveServicesAccountCreateParameters',
49
- type: {
50
- name: 'Composite',
51
- class_name: 'CognitiveServicesAccountCreateParameters',
52
- model_properties: {
53
- sku: {
54
- client_side_validation: true,
55
- required: true,
56
- serialized_name: 'sku',
57
- type: {
58
- name: 'Composite',
59
- class_name: 'Sku'
60
- }
61
- },
62
- kind: {
63
- client_side_validation: true,
64
- required: true,
65
- serialized_name: 'kind',
66
- type: {
67
- name: 'String'
68
- }
69
- },
70
- location: {
71
- client_side_validation: true,
72
- required: true,
73
- serialized_name: 'location',
74
- type: {
75
- name: 'String'
76
- }
77
- },
78
- tags: {
79
- client_side_validation: true,
80
- required: false,
81
- serialized_name: 'tags',
82
- type: {
83
- name: 'Dictionary',
84
- value: {
85
- client_side_validation: true,
86
- required: false,
87
- serialized_name: 'StringElementType',
88
- type: {
89
- name: 'String'
90
- }
91
- }
92
- }
93
- },
94
- properties: {
95
- client_side_validation: true,
96
- required: true,
97
- serialized_name: 'properties',
98
- type: {
99
- name: 'Object'
100
- }
101
- }
102
- }
103
- }
104
- }
105
- end
106
- end
107
- end
108
- end
@@ -1,82 +0,0 @@
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::CognitiveServices::Mgmt::V2017_04_18
7
- module Models
8
- #
9
- # The parameters to provide for the account.
10
- #
11
- class CognitiveServicesAccountUpdateParameters
12
-
13
- include MsRestAzure
14
-
15
- # @return [Sku] Gets or sets the SKU of the resource.
16
- attr_accessor :sku
17
-
18
- # @return [Hash{String => String}] Gets or sets a list of key value pairs
19
- # that describe the resource. These tags can be used in viewing and
20
- # grouping this resource (across resource groups). A maximum of 15 tags
21
- # can be provided for a resource. Each tag must have a key no greater
22
- # than 128 characters and value no greater than 256 characters.
23
- attr_accessor :tags
24
-
25
- # @return Additional properties for Account. Only provided fields will be
26
- # updated.
27
- attr_accessor :properties
28
-
29
-
30
- #
31
- # Mapper for CognitiveServicesAccountUpdateParameters class as Ruby Hash.
32
- # This will be used for serialization/deserialization.
33
- #
34
- def self.mapper()
35
- {
36
- client_side_validation: true,
37
- required: false,
38
- serialized_name: 'CognitiveServicesAccountUpdateParameters',
39
- type: {
40
- name: 'Composite',
41
- class_name: 'CognitiveServicesAccountUpdateParameters',
42
- model_properties: {
43
- sku: {
44
- client_side_validation: true,
45
- required: false,
46
- serialized_name: 'sku',
47
- type: {
48
- name: 'Composite',
49
- class_name: 'Sku'
50
- }
51
- },
52
- tags: {
53
- client_side_validation: true,
54
- required: false,
55
- serialized_name: 'tags',
56
- type: {
57
- name: 'Dictionary',
58
- value: {
59
- client_side_validation: true,
60
- required: false,
61
- serialized_name: 'StringElementType',
62
- type: {
63
- name: 'String'
64
- }
65
- }
66
- }
67
- },
68
- properties: {
69
- client_side_validation: true,
70
- required: false,
71
- serialized_name: 'properties',
72
- type: {
73
- name: 'Object'
74
- }
75
- }
76
- }
77
- }
78
- }
79
- end
80
- end
81
- end
82
- end
@@ -1,16 +0,0 @@
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::CognitiveServices::Mgmt::V2017_04_18
7
- module Models
8
- #
9
- # Defines values for NetworkRuleBypassOptions
10
- #
11
- module NetworkRuleBypassOptions
12
- AzureServices = "AzureServices"
13
- None = "None"
14
- end
15
- end
16
- end