Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
[AutoPR sql/resource-manager] Fixed inconsistent definitions for SQL …
Browse files Browse the repository at this point in the history
…2014 apis. (#1358) (#1366)

* Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9

Fixed inconsistent definitions for SQL 2014 apis.

* Generated from 929fcc6c506c0ca401f39a48a3ea55a0a948f9e9

Fixed inconsistent definitions for SQL 2014 apis.
  • Loading branch information
AutorestCI authored and sarangan12 committed Jun 13, 2018
1 parent 7c2d037 commit 11209ca
Show file tree
Hide file tree
Showing 339 changed files with 22,492 additions and 3,657 deletions.
908 changes: 584 additions & 324 deletions azure_sdk/lib/latest/modules/sql_profile_module.rb

Large diffs are not rendered by default.

123 changes: 62 additions & 61 deletions management/azure_mgmt_sql/lib/2014-04-01/generated/azure_mgmt_sql.rb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def initialize(client)
#
# @return [BackupLongTermRetentionPolicy] operation results.
#
def get(resource_group_name, server_name, database_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
def get(resource_group_name, server_name, database_name, custom_headers = nil)
response = get_async(resource_group_name, server_name, database_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -55,8 +55,8 @@ def get(resource_group_name, server_name, database_name, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
get_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
def get_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil)
get_async(resource_group_name, server_name, database_name, custom_headers).value!
end

#
Expand All @@ -72,7 +72,7 @@ def get_with_http_info(resource_group_name, server_name, database_name, custom_h
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(resource_group_name, server_name, database_name, custom_headers:nil)
def get_async(resource_group_name, server_name, database_name, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -82,7 +82,6 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -142,8 +141,8 @@ def get_async(resource_group_name, server_name, database_name, custom_headers:ni
#
# @return [BackupLongTermRetentionPolicy] operation results.
#
def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
def create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -161,9 +160,9 @@ def create_or_update(resource_group_name, server_name, database_name, parameters
# @return [Concurrent::Promise] promise which provides async access to http
# response.
#
def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
def create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers)
promise = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers)

promise = promise.then do |response|
# Defining deserialization method.
Expand Down Expand Up @@ -192,8 +191,8 @@ def create_or_update_async(resource_group_name, server_name, database_name, para
#
# @return [BackupLongTermRetentionPolicyListResult] operation results.
#
def list_by_database(resource_group_name, server_name, database_name, custom_headers:nil)
response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
def list_by_database(resource_group_name, server_name, database_name, custom_headers = nil)
response = list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -210,8 +209,8 @@ def list_by_database(resource_group_name, server_name, database_name, custom_hea
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers:nil)
list_by_database_async(resource_group_name, server_name, database_name, custom_headers:custom_headers).value!
def list_by_database_with_http_info(resource_group_name, server_name, database_name, custom_headers = nil)
list_by_database_async(resource_group_name, server_name, database_name, custom_headers).value!
end

#
Expand All @@ -227,7 +226,7 @@ def list_by_database_with_http_info(resource_group_name, server_name, database_n
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_database_async(resource_group_name, server_name, database_name, custom_headers:nil)
def list_by_database_async(resource_group_name, server_name, database_name, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -236,7 +235,6 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -296,8 +294,8 @@ def list_by_database_async(resource_group_name, server_name, database_name, cust
#
# @return [BackupLongTermRetentionPolicy] operation results.
#
def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
response = begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -316,8 +314,8 @@ def begin_create_or_update(resource_group_name, server_name, database_name, para
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update_with_http_info(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers).value!
end

#
Expand All @@ -335,7 +333,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, data
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers:nil)
def begin_create_or_update_async(resource_group_name, server_name, database_name, parameters, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -346,12 +344,13 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Serialize Request
request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionPolicy.mapper()
request_content = @client.serialize(request_mapper, parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def initialize(client)
#
# @return [BackupLongTermRetentionVault] operation results.
#
def get(resource_group_name, server_name, custom_headers:nil)
response = get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
def get(resource_group_name, server_name, custom_headers = nil)
response = get_async(resource_group_name, server_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -53,8 +53,8 @@ def get(resource_group_name, server_name, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def get_with_http_info(resource_group_name, server_name, custom_headers:nil)
get_async(resource_group_name, server_name, custom_headers:custom_headers).value!
def get_with_http_info(resource_group_name, server_name, custom_headers = nil)
get_async(resource_group_name, server_name, custom_headers).value!
end

#
Expand All @@ -69,7 +69,7 @@ def get_with_http_info(resource_group_name, server_name, custom_headers:nil)
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def get_async(resource_group_name, server_name, custom_headers:nil)
def get_async(resource_group_name, server_name, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -78,7 +78,6 @@ def get_async(resource_group_name, server_name, custom_headers:nil)


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -137,8 +136,8 @@ def get_async(resource_group_name, server_name, custom_headers:nil)
#
# @return [BackupLongTermRetentionVault] operation results.
#
def create_or_update(resource_group_name, server_name, parameters, custom_headers:nil)
response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
def create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
response = create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -155,9 +154,9 @@ def create_or_update(resource_group_name, server_name, parameters, custom_header
# @return [Concurrent::Promise] promise which provides async access to http
# response.
#
def create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil)
def create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil)
# Send request
promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers)
promise = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers)

promise = promise.then do |response|
# Defining deserialization method.
Expand Down Expand Up @@ -185,8 +184,8 @@ def create_or_update_async(resource_group_name, server_name, parameters, custom_
#
# @return [BackupLongTermRetentionVaultListResult] operation results.
#
def list_by_server(resource_group_name, server_name, custom_headers:nil)
response = list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
def list_by_server(resource_group_name, server_name, custom_headers = nil)
response = list_by_server_async(resource_group_name, server_name, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -202,8 +201,8 @@ def list_by_server(resource_group_name, server_name, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_server_with_http_info(resource_group_name, server_name, custom_headers:nil)
list_by_server_async(resource_group_name, server_name, custom_headers:custom_headers).value!
def list_by_server_with_http_info(resource_group_name, server_name, custom_headers = nil)
list_by_server_async(resource_group_name, server_name, custom_headers).value!
end

#
Expand All @@ -218,15 +217,14 @@ def list_by_server_with_http_info(resource_group_name, server_name, custom_heade
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
def list_by_server_async(resource_group_name, server_name, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'server_name is nil' if server_name.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down Expand Up @@ -285,8 +283,8 @@ def list_by_server_async(resource_group_name, server_name, custom_headers:nil)
#
# @return [BackupLongTermRetentionVault] operation results.
#
def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers:nil)
response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update(resource_group_name, server_name, parameters, custom_headers = nil)
response = begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -304,8 +302,8 @@ def begin_create_or_update(resource_group_name, server_name, parameters, custom_
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers:nil)
begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:custom_headers).value!
def begin_create_or_update_with_http_info(resource_group_name, server_name, parameters, custom_headers = nil)
begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers).value!
end

#
Expand All @@ -322,7 +320,7 @@ def begin_create_or_update_with_http_info(resource_group_name, server_name, para
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers:nil)
def begin_create_or_update_async(resource_group_name, server_name, parameters, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
Expand All @@ -332,12 +330,13 @@ def begin_create_or_update_async(resource_group_name, server_name, parameters, c


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
request_headers['accept-language'] = @client.accept_language unless @client.accept_language.nil?

request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Serialize Request
request_mapper = Azure::SQL::Mgmt::V2014_04_01::Models::BackupLongTermRetentionVault.mapper()
request_content = @client.serialize(request_mapper, parameters)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def initialize(client)
#
# @return [LocationCapabilities] operation results.
#
def list_by_location(location_id, custom_headers:nil)
response = list_by_location_async(location_id, custom_headers:custom_headers).value!
def list_by_location(location_id, custom_headers = nil)
response = list_by_location_async(location_id, custom_headers).value!
response.body unless response.nil?
end

Expand All @@ -47,8 +47,8 @@ def list_by_location(location_id, custom_headers:nil)
#
# @return [MsRestAzure::AzureOperationResponse] HTTP response information.
#
def list_by_location_with_http_info(location_id, custom_headers:nil)
list_by_location_async(location_id, custom_headers:custom_headers).value!
def list_by_location_with_http_info(location_id, custom_headers = nil)
list_by_location_async(location_id, custom_headers).value!
end

#
Expand All @@ -60,14 +60,13 @@ def list_by_location_with_http_info(location_id, custom_headers:nil)
#
# @return [Concurrent::Promise] Promise object which holds the HTTP response.
#
def list_by_location_async(location_id, custom_headers:nil)
def list_by_location_async(location_id, custom_headers = nil)
fail ArgumentError, '@client.api_version is nil' if @client.api_version.nil?
fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'location_id is nil' if location_id.nil?


request_headers = {}
request_headers['Content-Type'] = 'application/json; charset=utf-8'

# Set Headers
request_headers['x-ms-client-request-id'] = SecureRandom.uuid
Expand Down
Loading

0 comments on commit 11209ca

Please sign in to comment.