azure_mgmt_sql 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YWIzYzdjZTJhMDY3MjdkZTZlZmQ5YTE1MzQ1NDE4NDJhYzllMzljNg==
5
- data.tar.gz: !binary |-
6
- ZGEzMjcxODIwYWIyNWQyMWYwNDU0NmMxYjI1NGNjMDg3YjNiOWYyMA==
2
+ SHA1:
3
+ metadata.gz: 80b80d222f007bac34d0031b8460322444314686
4
+ data.tar.gz: 246dd14fc99abaf51b36dac52aeb43d5a59d7c5f
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MGE3OGQ3ZWQ2YzhlMzlmZGYyMThhMmU1NTIxMjM2NWUyODBlMzJjNTI4ZDA3
10
- OTdhZDcwMDI3MzE0ZGY4YzhlNmEyNjQ0OWVkYjMwNmY5ODA0YmI1OGExYzll
11
- YzlmY2Q2MmM2NzBmODc2YjAwMWNiN2M4NzFjYzA0MjY4YzE4OGY=
12
- data.tar.gz: !binary |-
13
- YzVjNjliMWYzNmNhNzg3MTk3ZjY4Y2E4OTRlZmI0YTRjNTM1MzY0YjBjODli
14
- NWMxY2ZjOGI2NzYyYzQ2NWVmODZlZWRkZWQyYTMwMDI0MmMxODMzN2JiMzc1
15
- YjkyY2Y5YWFmMGFmY2U3NDIxNGU2MzhlOTlhYTJkZGRjOTU0MzY=
6
+ metadata.gz: 1108de61b3f249ca79f7bb9e61dc016f47e5e0ae52e93ef6f8b21869a858f955514700decce1d33ebd78499242d67db2ce9ed206fe2da72aed4e5bfc79ca087c
7
+ data.tar.gz: ce704c5d166f82ff1ba503c8d390e81643bc8a722fabb606de87b5d43ef7bc6198748d30df04dfb93b03c3c7a1e769c484668b0adca1a75c5a88013d4bdf4a9d
@@ -5,8 +5,8 @@
5
5
  lib = File.expand_path('../lib', __FILE__)
6
6
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
7
 
8
- require 'azure_mgmt_sql/module_definition'
9
- require 'azure_mgmt_sql/version'
8
+ require 'generated/azure_mgmt_sql/module_definition'
9
+ require 'generated/azure_mgmt_sql/version'
10
10
 
11
11
  Gem::Specification.new do |spec|
12
12
  spec.name = 'azure_mgmt_sql'
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
  spec.email = 'azrubyteam@microsoft.com'
16
16
  spec.description = 'Microsoft Azure SQL Management Client Library for Ruby'
17
17
  spec.summary = 'Official Ruby client library to consume Microsoft Azure SQL Management services.'
18
- spec.homepage = 'http://github.com/azure/azure-sdk-ruby'
18
+ spec.homepage = 'https://aka.ms/azure-sdk-for-ruby'
19
19
  spec.license = 'MIT'
20
20
 
21
21
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -29,7 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'rake', '~> 10'
30
30
  spec.add_development_dependency 'rspec', '~> 3'
31
31
  spec.add_development_dependency 'dotenv', '~> 2'
32
- spec.add_development_dependency 'azure_mgmt_resources', '~> 0.3'
33
32
 
34
- spec.add_runtime_dependency 'ms_rest_azure', '~> 0.2.3'
33
+ spec.add_runtime_dependency 'ms_rest_azure', '~> 0.3.0'
35
34
  end
@@ -1,33 +1,5 @@
1
1
  # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
2
+ # Copyright (c) Microsoft Corporation. All rights reserved.
3
+ # Licensed under the MIT License. See License.txt in the project root for license information.
5
4
 
6
- require 'uri'
7
- require 'cgi'
8
- require 'date'
9
- require 'json'
10
- require 'base64'
11
- require 'erb'
12
- require 'securerandom'
13
- require 'time'
14
- require 'timeliness'
15
- require 'faraday'
16
- require 'faraday-cookie_jar'
17
- require 'concurrent'
18
- require 'ms_rest'
19
- require 'azure_mgmt_sql/module_definition'
20
- require 'ms_rest_azure'
21
-
22
- module Azure::ARM::SQL
23
- autoload :SecurityAlertPolicy, 'azure_mgmt_sql/security_alert_policy.rb'
24
- autoload :SqlManagementClient, 'azure_mgmt_sql/sql_management_client.rb'
25
-
26
- module Models
27
- autoload :ServerSecurityAlertPolicyProperties, 'azure_mgmt_sql/models/server_security_alert_policy_properties.rb'
28
- autoload :ServerSecurityAlertPolicyCreateOrUpdateParameters, 'azure_mgmt_sql/models/server_security_alert_policy_create_or_update_parameters.rb'
29
- autoload :ServerSecurityAlertPolicy, 'azure_mgmt_sql/models/server_security_alert_policy.rb'
30
- autoload :State, 'azure_mgmt_sql/models/state.rb'
31
- autoload :EmailAccountAdmins, 'azure_mgmt_sql/models/email_account_admins.rb'
32
- end
33
- end
5
+ require 'generated/azure_mgmt_sql'
@@ -0,0 +1,32 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ require 'uri'
7
+ require 'cgi'
8
+ require 'date'
9
+ require 'json'
10
+ require 'base64'
11
+ require 'erb'
12
+ require 'securerandom'
13
+ require 'time'
14
+ require 'timeliness'
15
+ require 'faraday'
16
+ require 'faraday-cookie_jar'
17
+ require 'concurrent'
18
+ require 'ms_rest'
19
+ require 'generated/azure_mgmt_sql/module_definition'
20
+ require 'ms_rest_azure'
21
+
22
+ module Azure::ARM::SQL
23
+ autoload :SecurityAlertPolicy, 'generated/azure_mgmt_sql/security_alert_policy.rb'
24
+ autoload :SqlManagementClient, 'generated/azure_mgmt_sql/sql_management_client.rb'
25
+
26
+ module Models
27
+ autoload :ServerSecurityAlertPolicyCreateOrUpdateParameters, 'generated/azure_mgmt_sql/models/server_security_alert_policy_create_or_update_parameters.rb'
28
+ autoload :ServerSecurityAlertPolicy, 'generated/azure_mgmt_sql/models/server_security_alert_policy.rb'
29
+ autoload :State, 'generated/azure_mgmt_sql/models/state.rb'
30
+ autoload :EmailAccountAdmins, 'generated/azure_mgmt_sql/models/email_account_admins.rb'
31
+ end
32
+ end
@@ -0,0 +1,129 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::SQL
7
+ module Models
8
+ #
9
+ # Represents an Azure SQL Server Security Alert Policy.
10
+ #
11
+ class ServerSecurityAlertPolicy < MsRestAzure::Resource
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [State] The state of the Azure SQL Security alert policy (New,
16
+ # Enabled or Disabled). Possible values include: 'Enabled', 'Disabled',
17
+ # 'New'
18
+ attr_accessor :state
19
+
20
+ # @return [String] The disable alerts of the Azure SQL Security alert
21
+ # policy.
22
+ attr_accessor :disabled_alerts
23
+
24
+ # @return [String] The list of email addresses to send the alert.
25
+ attr_accessor :email_addresses
26
+
27
+ # @return [EmailAccountAdmins] Value that indicated whether to email the
28
+ # azure account admins. Possible values include: 'Enabled', 'Disabled'
29
+ attr_accessor :email_account_admins
30
+
31
+
32
+ #
33
+ # Mapper for ServerSecurityAlertPolicy class as Ruby Hash.
34
+ # This will be used for serialization/deserialization.
35
+ #
36
+ def self.mapper()
37
+ {
38
+ required: false,
39
+ serialized_name: 'ServerSecurityAlertPolicy',
40
+ type: {
41
+ name: 'Composite',
42
+ class_name: 'ServerSecurityAlertPolicy',
43
+ model_properties: {
44
+ id: {
45
+ required: false,
46
+ read_only: true,
47
+ serialized_name: 'id',
48
+ type: {
49
+ name: 'String'
50
+ }
51
+ },
52
+ name: {
53
+ required: false,
54
+ read_only: true,
55
+ serialized_name: 'name',
56
+ type: {
57
+ name: 'String'
58
+ }
59
+ },
60
+ type: {
61
+ required: false,
62
+ read_only: true,
63
+ serialized_name: 'type',
64
+ type: {
65
+ name: 'String'
66
+ }
67
+ },
68
+ location: {
69
+ required: true,
70
+ serialized_name: 'location',
71
+ type: {
72
+ name: 'String'
73
+ }
74
+ },
75
+ tags: {
76
+ required: false,
77
+ serialized_name: 'tags',
78
+ type: {
79
+ name: 'Dictionary',
80
+ value: {
81
+ required: false,
82
+ serialized_name: 'StringElementType',
83
+ type: {
84
+ name: 'String'
85
+ }
86
+ }
87
+ }
88
+ },
89
+ state: {
90
+ required: false,
91
+ read_only: true,
92
+ serialized_name: 'properties.state',
93
+ type: {
94
+ name: 'Enum',
95
+ module: 'State'
96
+ }
97
+ },
98
+ disabled_alerts: {
99
+ required: false,
100
+ read_only: true,
101
+ serialized_name: 'properties.disabledAlerts',
102
+ type: {
103
+ name: 'String'
104
+ }
105
+ },
106
+ email_addresses: {
107
+ required: false,
108
+ read_only: true,
109
+ serialized_name: 'properties.emailAddresses',
110
+ type: {
111
+ name: 'String'
112
+ }
113
+ },
114
+ email_account_admins: {
115
+ required: false,
116
+ read_only: true,
117
+ serialized_name: 'properties.emailAccountAdmins',
118
+ type: {
119
+ name: 'Enum',
120
+ module: 'EmailAccountAdmins'
121
+ }
122
+ }
123
+ }
124
+ }
125
+ }
126
+ end
127
+ end
128
+ end
129
+ end
@@ -0,0 +1,85 @@
1
+ # encoding: utf-8
2
+ # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
+ # Changes may cause incorrect behavior and will be lost if the code is
4
+ # regenerated.
5
+
6
+ module Azure::ARM::SQL
7
+ module Models
8
+ #
9
+ # Create or update server security alert policy parameters.
10
+ #
11
+ class ServerSecurityAlertPolicyCreateOrUpdateParameters
12
+
13
+ include MsRestAzure
14
+
15
+ # @return [State] The state of the Azure SQL Security alert policy (New,
16
+ # Enabled or Disabled). Possible values include: 'Enabled', 'Disabled',
17
+ # 'New'
18
+ attr_accessor :state
19
+
20
+ # @return [String] The disable alerts of the Azure SQL Security alert
21
+ # policy.
22
+ attr_accessor :disabled_alerts
23
+
24
+ # @return [String] The list of email addresses to send the alert.
25
+ attr_accessor :email_addresses
26
+
27
+ # @return [EmailAccountAdmins] Value that indicated whether to email the
28
+ # azure account admins. Possible values include: 'Enabled', 'Disabled'
29
+ attr_accessor :email_account_admins
30
+
31
+
32
+ #
33
+ # Mapper for ServerSecurityAlertPolicyCreateOrUpdateParameters class as
34
+ # Ruby Hash.
35
+ # This will be used for serialization/deserialization.
36
+ #
37
+ def self.mapper()
38
+ {
39
+ required: false,
40
+ serialized_name: 'ServerSecurityAlertPolicyCreateOrUpdateParameters',
41
+ type: {
42
+ name: 'Composite',
43
+ class_name: 'ServerSecurityAlertPolicyCreateOrUpdateParameters',
44
+ model_properties: {
45
+ state: {
46
+ required: false,
47
+ read_only: true,
48
+ serialized_name: 'properties.state',
49
+ type: {
50
+ name: 'Enum',
51
+ module: 'State'
52
+ }
53
+ },
54
+ disabled_alerts: {
55
+ required: false,
56
+ read_only: true,
57
+ serialized_name: 'properties.disabledAlerts',
58
+ type: {
59
+ name: 'String'
60
+ }
61
+ },
62
+ email_addresses: {
63
+ required: false,
64
+ read_only: true,
65
+ serialized_name: 'properties.emailAddresses',
66
+ type: {
67
+ name: 'String'
68
+ }
69
+ },
70
+ email_account_admins: {
71
+ required: false,
72
+ read_only: true,
73
+ serialized_name: 'properties.emailAccountAdmins',
74
+ type: {
75
+ name: 'Enum',
76
+ module: 'EmailAccountAdmins'
77
+ }
78
+ }
79
+ }
80
+ }
81
+ }
82
+ end
83
+ end
84
+ end
85
+ end
@@ -34,25 +34,38 @@ module Azure::ARM::SQL
34
34
  # @param resource_group_name [String] The name of the Resource Group to which
35
35
  # the server belongs.
36
36
  # @param server_name [String] The name of the Azure SQL Server.
37
- # @param @client.api_version [String] Client Api Version.
38
- # @param @client.subscription_id [String] The subscription credentials which
39
- # uniquely identify Microsoft Azure subscription.
40
- # @param @client.accept_language [String] Gets or sets the preferred language
41
- # for the response.
37
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
38
+ # will be added to the HTTP request.
39
+ #
40
+ # @return [ServerSecurityAlertPolicy] operation results.
41
+ #
42
+ def create_or_update(parameters, resource_group_name, server_name, custom_headers = nil)
43
+ response = create_or_update_async(parameters, resource_group_name, server_name, custom_headers).value!
44
+ response.body unless response.nil?
45
+ end
46
+
47
+ #
48
+ # @param parameters [ServerSecurityAlertPolicyCreateOrUpdateParameters] The
49
+ # required parameters for creating or updating a Azure SQL Server security
50
+ # alert policy.
51
+ # @param resource_group_name [String] The name of the Resource Group to which
52
+ # the server belongs.
53
+ # @param server_name [String] The name of the Azure SQL Server.
54
+ # @param custom_headers [Hash{String => String}] A hash of custom headers that
55
+ # will be added to the HTTP request.
42
56
  #
43
57
  # @return [Concurrent::Promise] promise which provides async access to http
44
58
  # response.
45
59
  #
46
- def create_or_update(parameters, resource_group_name, server_name, custom_headers = nil)
60
+ def create_or_update_async(parameters, resource_group_name, server_name, custom_headers = nil)
47
61
  # Send request
48
62
  promise = begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers)
49
63
 
50
64
  promise = promise.then do |response|
51
65
  # Defining deserialization method.
52
66
  deserialize_method = lambda do |parsed_response|
53
- unless parsed_response.nil?
54
- parsed_response = ServerSecurityAlertPolicy.deserialize_object(parsed_response)
55
- end
67
+ result_mapper = ServerSecurityAlertPolicy.mapper()
68
+ parsed_response = @client.deserialize(result_mapper, parsed_response, 'parsed_response')
56
69
  end
57
70
 
58
71
  # Waiting for response.
@@ -115,23 +128,25 @@ module Azure::ARM::SQL
115
128
  #
116
129
  def begin_create_or_update_async(parameters, resource_group_name, server_name, custom_headers = nil)
117
130
  fail ArgumentError, 'parameters is nil' if parameters.nil?
118
- parameters.validate unless parameters.nil?
119
131
  fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
120
132
  fail ArgumentError, 'server_name is nil' if server_name.nil?
121
133
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
122
134
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
135
+
136
+
123
137
  request_headers = {}
124
138
 
125
139
  # Set Headers
126
140
  request_headers['x-ms-client-request-id'] = SecureRandom.uuid
127
141
  request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?
128
142
 
129
- # Serialize Request
130
143
  request_headers['Content-Type'] = 'application/json; charset=utf-8'
131
- unless parameters.nil?
132
- parameters = ServerSecurityAlertPolicyCreateOrUpdateParameters.serialize_object(parameters)
133
- end
134
- request_content = parameters != nil ? JSON.generate(parameters, quirks_mode: true) : nil
144
+
145
+ # Serialize Request
146
+ request_mapper = ServerSecurityAlertPolicyCreateOrUpdateParameters.mapper()
147
+ request_content = @client.serialize(request_mapper, parameters, 'parameters')
148
+ request_content = request_content != nil ? JSON.generate(request_content, quirks_mode: true) : nil
149
+
135
150
  path_template = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/securityAlertPolicies/Default'
136
151
  options = {
137
152
  middlewares: [[MsRest::RetryPolicyMiddleware, times: 3, retry: 0.02], [:cookie_jar]],
@@ -163,10 +178,8 @@ module Azure::ARM::SQL
163
178
  if status_code == 200
164
179
  begin
165
180
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
166
- unless parsed_response.nil?
167
- parsed_response = ServerSecurityAlertPolicy.deserialize_object(parsed_response)
168
- end
169
- result.body = parsed_response
181
+ result_mapper = ServerSecurityAlertPolicy.mapper()
182
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
170
183
  rescue Exception => e
171
184
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
172
185
  end
@@ -175,10 +188,8 @@ module Azure::ARM::SQL
175
188
  if status_code == 201
176
189
  begin
177
190
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
178
- unless parsed_response.nil?
179
- parsed_response = ServerSecurityAlertPolicy.deserialize_object(parsed_response)
180
- end
181
- result.body = parsed_response
191
+ result_mapper = ServerSecurityAlertPolicy.mapper()
192
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
182
193
  rescue Exception => e
183
194
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
184
195
  end
@@ -237,6 +248,8 @@ module Azure::ARM::SQL
237
248
  fail ArgumentError, 'server_name is nil' if server_name.nil?
238
249
  fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
239
250
  fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
251
+
252
+
240
253
  request_headers = {}
241
254
 
242
255
  # Set Headers
@@ -272,10 +285,8 @@ module Azure::ARM::SQL
272
285
  if status_code == 200
273
286
  begin
274
287
  parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
275
- unless parsed_response.nil?
276
- parsed_response = ServerSecurityAlertPolicy.deserialize_object(parsed_response)
277
- end
278
- result.body = parsed_response
288
+ result_mapper = ServerSecurityAlertPolicy.mapper()
289
+ result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
279
290
  rescue Exception => e
280
291
  fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
281
292
  end
@@ -8,13 +8,13 @@ module Azure::ARM::SQL
8
8
  # A service client - single point of access to the REST API.
9
9
  #
10
10
  class SqlManagementClient < MsRestAzure::AzureServiceClient
11
- include Azure::ARM::SQL::Models
11
+ include MsRest::Serialization
12
12
  include MsRestAzure
13
13
 
14
14
  # @return [String] the base URI of the service.
15
15
  attr_accessor :base_url
16
16
 
17
- # @return Gets Azure subscription credentials.
17
+ # @return Credentials needed for the client to connect to Azure.
18
18
  attr_reader :credentials
19
19
 
20
20
  # @return [String] The subscription credentials which uniquely identify
@@ -39,7 +39,7 @@ module Azure::ARM::SQL
39
39
  # subscription.
40
40
  attr_accessor :credentials
41
41
 
42
- # @return security_alert_policy
42
+ # @return [SecurityAlertPolicy] security_alert_policy
43
43
  attr_reader :security_alert_policy
44
44
 
45
45
  #
@@ -4,5 +4,5 @@
4
4
  # regenerated.
5
5
 
6
6
  module Azure::ARM::SQL
7
- VERSION = '0.3.1'
7
+ VERSION = '0.4.0'
8
8
  end
metadata CHANGED
@@ -1,127 +1,106 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azure_mgmt_sql
3
3
  version: !ruby/object:Gem::Version
4
- version: !binary |-
5
- MC4zLjE=
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Microsoft Corporation
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2016-05-24 00:00:00.000000000 Z
11
+ date: 2016-07-22 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
16
  requirements:
18
- - - ~>
17
+ - - "~>"
19
18
  - !ruby/object:Gem::Version
20
19
  version: '1.9'
21
20
  type: :development
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
- - - ~>
24
+ - - "~>"
26
25
  - !ruby/object:Gem::Version
27
26
  version: '1.9'
28
27
  - !ruby/object:Gem::Dependency
29
28
  name: rake
30
29
  requirement: !ruby/object:Gem::Requirement
31
30
  requirements:
32
- - - ~>
31
+ - - "~>"
33
32
  - !ruby/object:Gem::Version
34
33
  version: '10'
35
34
  type: :development
36
35
  prerelease: false
37
36
  version_requirements: !ruby/object:Gem::Requirement
38
37
  requirements:
39
- - - ~>
38
+ - - "~>"
40
39
  - !ruby/object:Gem::Version
41
40
  version: '10'
42
41
  - !ruby/object:Gem::Dependency
43
42
  name: rspec
44
43
  requirement: !ruby/object:Gem::Requirement
45
44
  requirements:
46
- - - ~>
45
+ - - "~>"
47
46
  - !ruby/object:Gem::Version
48
- version: !binary |-
49
- Mw==
47
+ version: '3'
50
48
  type: :development
51
49
  prerelease: false
52
50
  version_requirements: !ruby/object:Gem::Requirement
53
51
  requirements:
54
- - - ~>
52
+ - - "~>"
55
53
  - !ruby/object:Gem::Version
56
- version: !binary |-
57
- Mw==
54
+ version: '3'
58
55
  - !ruby/object:Gem::Dependency
59
56
  name: dotenv
60
57
  requirement: !ruby/object:Gem::Requirement
61
58
  requirements:
62
- - - ~>
59
+ - - "~>"
63
60
  - !ruby/object:Gem::Version
64
61
  version: '2'
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
- - - ~>
66
+ - - "~>"
70
67
  - !ruby/object:Gem::Version
71
68
  version: '2'
72
- - !ruby/object:Gem::Dependency
73
- name: azure_mgmt_resources
74
- requirement: !ruby/object:Gem::Requirement
75
- requirements:
76
- - - ~>
77
- - !ruby/object:Gem::Version
78
- version: !binary |-
79
- MC4z
80
- type: :development
81
- prerelease: false
82
- version_requirements: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ~>
85
- - !ruby/object:Gem::Version
86
- version: !binary |-
87
- MC4z
88
69
  - !ruby/object:Gem::Dependency
89
70
  name: ms_rest_azure
90
71
  requirement: !ruby/object:Gem::Requirement
91
72
  requirements:
92
- - - ~>
73
+ - - "~>"
93
74
  - !ruby/object:Gem::Version
94
- version: !binary |-
95
- MC4yLjM=
75
+ version: 0.3.0
96
76
  type: :runtime
97
77
  prerelease: false
98
78
  version_requirements: !ruby/object:Gem::Requirement
99
79
  requirements:
100
- - - ~>
80
+ - - "~>"
101
81
  - !ruby/object:Gem::Version
102
- version: !binary |-
103
- MC4yLjM=
82
+ version: 0.3.0
104
83
  description: Microsoft Azure SQL Management Client Library for Ruby
105
84
  email: azrubyteam@microsoft.com
106
85
  executables: []
107
86
  extensions: []
108
87
  extra_rdoc_files: []
109
88
  files:
110
- - .rspec
89
+ - ".rspec"
111
90
  - LICENSE.txt
112
91
  - Rakefile
113
92
  - azure_mgmt_sql.gemspec
114
93
  - lib/azure_mgmt_sql.rb
115
- - lib/azure_mgmt_sql/models/email_account_admins.rb
116
- - lib/azure_mgmt_sql/models/server_security_alert_policy.rb
117
- - lib/azure_mgmt_sql/models/server_security_alert_policy_create_or_update_parameters.rb
118
- - lib/azure_mgmt_sql/models/server_security_alert_policy_properties.rb
119
- - lib/azure_mgmt_sql/models/state.rb
120
- - lib/azure_mgmt_sql/module_definition.rb
121
- - lib/azure_mgmt_sql/security_alert_policy.rb
122
- - lib/azure_mgmt_sql/sql_management_client.rb
123
- - lib/azure_mgmt_sql/version.rb
124
- homepage: http://github.com/azure/azure-sdk-ruby
94
+ - lib/generated/azure_mgmt_sql.rb
95
+ - lib/generated/azure_mgmt_sql/models/email_account_admins.rb
96
+ - lib/generated/azure_mgmt_sql/models/server_security_alert_policy.rb
97
+ - lib/generated/azure_mgmt_sql/models/server_security_alert_policy_create_or_update_parameters.rb
98
+ - lib/generated/azure_mgmt_sql/models/state.rb
99
+ - lib/generated/azure_mgmt_sql/module_definition.rb
100
+ - lib/generated/azure_mgmt_sql/security_alert_policy.rb
101
+ - lib/generated/azure_mgmt_sql/sql_management_client.rb
102
+ - lib/generated/azure_mgmt_sql/version.rb
103
+ homepage: https://aka.ms/azure-sdk-for-ruby
125
104
  licenses:
126
105
  - MIT
127
106
  metadata: {}
@@ -131,17 +110,17 @@ require_paths:
131
110
  - lib
132
111
  required_ruby_version: !ruby/object:Gem::Requirement
133
112
  requirements:
134
- - - ! '>='
113
+ - - ">="
135
114
  - !ruby/object:Gem::Version
136
115
  version: 1.9.3
137
116
  required_rubygems_version: !ruby/object:Gem::Requirement
138
117
  requirements:
139
- - - ! '>='
118
+ - - ">="
140
119
  - !ruby/object:Gem::Version
141
120
  version: '0'
142
121
  requirements: []
143
122
  rubyforge_project:
144
- rubygems_version: 2.4.5
123
+ rubygems_version: 2.4.6
145
124
  signing_key:
146
125
  specification_version: 4
147
126
  summary: Official Ruby client library to consume Microsoft Azure SQL Management services.
@@ -1,93 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::SQL
7
- module Models
8
- #
9
- # Represents an Azure SQL Server Security Alert Policy.
10
- #
11
- class ServerSecurityAlertPolicy < MsRestAzure::Resource
12
-
13
- include MsRestAzure
14
-
15
- # @return [ServerSecurityAlertPolicyProperties] Represents the
16
- # properties of the resource.
17
- attr_accessor :properties
18
-
19
- #
20
- # Validate the object. Throws ValidationError if validation fails.
21
- #
22
- def validate
23
- @properties.validate unless @properties.nil?
24
- end
25
-
26
- #
27
- # Serializes given Model object into Ruby Hash.
28
- # @param object Model object to serialize.
29
- # @return [Hash] Serialized object in form of Ruby Hash.
30
- #
31
- def self.serialize_object(object)
32
- object.validate
33
- output_object = {}
34
-
35
- serialized_property = object.location
36
- output_object['location'] = serialized_property unless serialized_property.nil?
37
-
38
- serialized_property = object.id
39
- output_object['id'] = serialized_property unless serialized_property.nil?
40
-
41
- serialized_property = object.name
42
- output_object['name'] = serialized_property unless serialized_property.nil?
43
-
44
- serialized_property = object.type
45
- output_object['type'] = serialized_property unless serialized_property.nil?
46
-
47
- serialized_property = object.tags
48
- output_object['tags'] = serialized_property unless serialized_property.nil?
49
-
50
- serialized_property = object.properties
51
- unless serialized_property.nil?
52
- serialized_property = ServerSecurityAlertPolicyProperties.serialize_object(serialized_property)
53
- end
54
- output_object['properties'] = serialized_property unless serialized_property.nil?
55
-
56
- output_object
57
- end
58
-
59
- #
60
- # Deserializes given Ruby Hash into Model object.
61
- # @param object [Hash] Ruby Hash object to deserialize.
62
- # @return [ServerSecurityAlertPolicy] Deserialized object.
63
- #
64
- def self.deserialize_object(object)
65
- return if object.nil?
66
- output_object = ServerSecurityAlertPolicy.new
67
-
68
- deserialized_property = object['location']
69
- output_object.location = deserialized_property
70
-
71
- deserialized_property = object['id']
72
- output_object.id = deserialized_property
73
-
74
- deserialized_property = object['name']
75
- output_object.name = deserialized_property
76
-
77
- deserialized_property = object['type']
78
- output_object.type = deserialized_property
79
-
80
- deserialized_property = object['tags']
81
- output_object.tags = deserialized_property
82
-
83
- deserialized_property = object['properties']
84
- unless deserialized_property.nil?
85
- deserialized_property = ServerSecurityAlertPolicyProperties.deserialize_object(deserialized_property)
86
- end
87
- output_object.properties = deserialized_property
88
-
89
- output_object
90
- end
91
- end
92
- end
93
- end
@@ -1,65 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::SQL
7
- module Models
8
- #
9
- # Create or update server security alert policy parameters.
10
- #
11
- class ServerSecurityAlertPolicyCreateOrUpdateParameters
12
-
13
- include MsRestAzure
14
-
15
- # @return [ServerSecurityAlertPolicyProperties] Properties of the
16
- # request.
17
- attr_accessor :properties
18
-
19
- #
20
- # Validate the object. Throws ValidationError if validation fails.
21
- #
22
- def validate
23
- fail MsRest::ValidationError, 'property properties is nil' if @properties.nil?
24
- @properties.validate unless @properties.nil?
25
- end
26
-
27
- #
28
- # Serializes given Model object into Ruby Hash.
29
- # @param object Model object to serialize.
30
- # @return [Hash] Serialized object in form of Ruby Hash.
31
- #
32
- def self.serialize_object(object)
33
- object.validate
34
- output_object = {}
35
-
36
- serialized_property = object.properties
37
- unless serialized_property.nil?
38
- serialized_property = ServerSecurityAlertPolicyProperties.serialize_object(serialized_property)
39
- end
40
- output_object['properties'] = serialized_property unless serialized_property.nil?
41
-
42
- output_object
43
- end
44
-
45
- #
46
- # Deserializes given Ruby Hash into Model object.
47
- # @param object [Hash] Ruby Hash object to deserialize.
48
- # @return [ServerSecurityAlertPolicyCreateOrUpdateParameters]
49
- # Deserialized object.
50
- #
51
- def self.deserialize_object(object)
52
- return if object.nil?
53
- output_object = ServerSecurityAlertPolicyCreateOrUpdateParameters.new
54
-
55
- deserialized_property = object['properties']
56
- unless deserialized_property.nil?
57
- deserialized_property = ServerSecurityAlertPolicyProperties.deserialize_object(deserialized_property)
58
- end
59
- output_object.properties = deserialized_property
60
-
61
- output_object
62
- end
63
- end
64
- end
65
- end
@@ -1,94 +0,0 @@
1
- # encoding: utf-8
2
- # Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
3
- # Changes may cause incorrect behavior and will be lost if the code is
4
- # regenerated.
5
-
6
- module Azure::ARM::SQL
7
- module Models
8
- #
9
- # Represents the properties of an Azure SQL Security alert policy.
10
- #
11
- class ServerSecurityAlertPolicyProperties
12
-
13
- include MsRestAzure
14
-
15
- # @return [State] The state of the Azure SQL Security alert policy (New,
16
- # Enabled or Disabled). Possible values include: 'Enabled', 'Disabled',
17
- # 'New'
18
- attr_accessor :state
19
-
20
- # @return [String] The disable alerts of the Azure SQL Security alert
21
- # policy.
22
- attr_accessor :disabled_alerts
23
-
24
- # @return [String] The list of email addresses to send the alert.
25
- attr_accessor :email_addresses
26
-
27
- # @return [EmailAccountAdmins] Value that indicated whether to email the
28
- # azure account admins. Possible values include: 'Enabled', 'Disabled'
29
- attr_accessor :email_account_admins
30
-
31
- #
32
- # Validate the object. Throws ValidationError if validation fails.
33
- #
34
- def validate
35
- end
36
-
37
- #
38
- # Serializes given Model object into Ruby Hash.
39
- # @param object Model object to serialize.
40
- # @return [Hash] Serialized object in form of Ruby Hash.
41
- #
42
- def self.serialize_object(object)
43
- object.validate
44
- output_object = {}
45
-
46
- serialized_property = object.state
47
- output_object['state'] = serialized_property unless serialized_property.nil?
48
-
49
- serialized_property = object.disabled_alerts
50
- output_object['disabledAlerts'] = serialized_property unless serialized_property.nil?
51
-
52
- serialized_property = object.email_addresses
53
- output_object['emailAddresses'] = serialized_property unless serialized_property.nil?
54
-
55
- serialized_property = object.email_account_admins
56
- output_object['emailAccountAdmins'] = serialized_property unless serialized_property.nil?
57
-
58
- output_object
59
- end
60
-
61
- #
62
- # Deserializes given Ruby Hash into Model object.
63
- # @param object [Hash] Ruby Hash object to deserialize.
64
- # @return [ServerSecurityAlertPolicyProperties] Deserialized object.
65
- #
66
- def self.deserialize_object(object)
67
- return if object.nil?
68
- output_object = ServerSecurityAlertPolicyProperties.new
69
-
70
- deserialized_property = object['state']
71
- if (!deserialized_property.nil? && !deserialized_property.empty?)
72
- enum_is_valid = State.constants.any? { |e| State.const_get(e).to_s.downcase == deserialized_property.downcase }
73
- warn 'Enum State does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
74
- end
75
- output_object.state = deserialized_property
76
-
77
- deserialized_property = object['disabledAlerts']
78
- output_object.disabled_alerts = deserialized_property
79
-
80
- deserialized_property = object['emailAddresses']
81
- output_object.email_addresses = deserialized_property
82
-
83
- deserialized_property = object['emailAccountAdmins']
84
- if (!deserialized_property.nil? && !deserialized_property.empty?)
85
- enum_is_valid = EmailAccountAdmins.constants.any? { |e| EmailAccountAdmins.const_get(e).to_s.downcase == deserialized_property.downcase }
86
- warn 'Enum EmailAccountAdmins does not contain ' + deserialized_property.downcase + ', but was received from the server.' unless enum_is_valid
87
- end
88
- output_object.email_account_admins = deserialized_property
89
-
90
- output_object
91
- end
92
- end
93
- end
94
- end