Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions management/azure_mgmt_sql/lib/generated/azure_mgmt_sql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,29 @@ module Azure::ARM::SQL

module Models
autoload :ElasticPoolListResult, 'generated/azure_mgmt_sql/models/elastic_pool_list_result.rb'
autoload :ServiceObjectiveListResult, 'generated/azure_mgmt_sql/models/service_objective_list_result.rb'
autoload :ServiceTierAdvisorListResult, 'generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb'
autoload :SqlSubResource, 'generated/azure_mgmt_sql/models/sql_sub_resource.rb'
autoload :ServerMetricListResult, 'generated/azure_mgmt_sql/models/server_metric_list_result.rb'
autoload :ServerFirewallRuleListResult, 'generated/azure_mgmt_sql/models/server_firewall_rule_list_result.rb'
autoload :Operation, 'generated/azure_mgmt_sql/models/operation.rb'
autoload :ServerMetric, 'generated/azure_mgmt_sql/models/server_metric.rb'
autoload :DatabaseMetricListResult, 'generated/azure_mgmt_sql/models/database_metric_list_result.rb'
autoload :RecommendedElasticPoolMetric, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_metric.rb'
autoload :DatabaseMetric, 'generated/azure_mgmt_sql/models/database_metric.rb'
autoload :RestorePointListResult, 'generated/azure_mgmt_sql/models/restore_point_list_result.rb'
autoload :RecommendedElasticPoolListResult, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_list_result.rb'
autoload :TransparentDataEncryptionActivityListResult, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb'
autoload :OperationImpact, 'generated/azure_mgmt_sql/models/operation_impact.rb'
autoload :RecommendedElasticPoolListMetricsResult, 'generated/azure_mgmt_sql/models/recommended_elastic_pool_list_metrics_result.rb'
autoload :ServiceObjectiveListResult, 'generated/azure_mgmt_sql/models/service_objective_list_result.rb'
autoload :RecommendedDatabaseProperties, 'generated/azure_mgmt_sql/models/recommended_database_properties.rb'
autoload :SqlSubResource, 'generated/azure_mgmt_sql/models/sql_sub_resource.rb'
autoload :RestorePointListResult, 'generated/azure_mgmt_sql/models/restore_point_list_result.rb'
autoload :SloUsageMetric, 'generated/azure_mgmt_sql/models/slo_usage_metric.rb'
autoload :OperationDisplay, 'generated/azure_mgmt_sql/models/operation_display.rb'
autoload :UpgradeHint, 'generated/azure_mgmt_sql/models/upgrade_hint.rb'
autoload :ReplicationLinkListResult, 'generated/azure_mgmt_sql/models/replication_link_list_result.rb'
autoload :DatabaseListResult, 'generated/azure_mgmt_sql/models/database_list_result.rb'
autoload :OperationImpact, 'generated/azure_mgmt_sql/models/operation_impact.rb'
autoload :TransparentDataEncryptionActivityListResult, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity_list_result.rb'
autoload :UpgradeRecommendedElasticPoolProperties, 'generated/azure_mgmt_sql/models/upgrade_recommended_elastic_pool_properties.rb'
autoload :ReplicationLinkListResult, 'generated/azure_mgmt_sql/models/replication_link_list_result.rb'
autoload :OperationListResult, 'generated/azure_mgmt_sql/models/operation_list_result.rb'
autoload :ElasticPoolActivityListResult, 'generated/azure_mgmt_sql/models/elastic_pool_activity_list_result.rb'
autoload :ServiceTierAdvisorListResult, 'generated/azure_mgmt_sql/models/service_tier_advisor_list_result.rb'
autoload :ServerFirewallRuleListResult, 'generated/azure_mgmt_sql/models/server_firewall_rule_list_result.rb'
autoload :ServerListResult, 'generated/azure_mgmt_sql/models/server_list_result.rb'
autoload :UpgradeHint, 'generated/azure_mgmt_sql/models/upgrade_hint.rb'
autoload :SloUsageMetric, 'generated/azure_mgmt_sql/models/slo_usage_metric.rb'
autoload :ElasticPoolDatabaseActivityListResult, 'generated/azure_mgmt_sql/models/elastic_pool_database_activity_list_result.rb'
autoload :ServerFirewallRule, 'generated/azure_mgmt_sql/models/server_firewall_rule.rb'
autoload :ReplicationLink, 'generated/azure_mgmt_sql/models/replication_link.rb'
Expand All @@ -66,6 +67,7 @@ module Models
autoload :ElasticPoolDatabaseActivity, 'generated/azure_mgmt_sql/models/elastic_pool_database_activity.rb'
autoload :Server, 'generated/azure_mgmt_sql/models/server.rb'
autoload :RestorePoint, 'generated/azure_mgmt_sql/models/restore_point.rb'
autoload :DatabaseMetric, 'generated/azure_mgmt_sql/models/database_metric.rb'
autoload :ServiceObjective, 'generated/azure_mgmt_sql/models/service_objective.rb'
autoload :TransparentDataEncryptionActivity, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity.rb'
autoload :ReplicationRole, 'generated/azure_mgmt_sql/models/replication_role.rb'
Expand All @@ -79,9 +81,11 @@ module Models
autoload :RecommendedIndexStates, 'generated/azure_mgmt_sql/models/recommended_index_states.rb'
autoload :RecommendedIndexTypes, 'generated/azure_mgmt_sql/models/recommended_index_types.rb'
autoload :TransparentDataEncryptionStates, 'generated/azure_mgmt_sql/models/transparent_data_encryption_states.rb'
autoload :TargetDatabaseEditions, 'generated/azure_mgmt_sql/models/target_database_editions.rb'
autoload :ReadScale, 'generated/azure_mgmt_sql/models/read_scale.rb'
autoload :SampleName, 'generated/azure_mgmt_sql/models/sample_name.rb'
autoload :ElasticPoolState, 'generated/azure_mgmt_sql/models/elastic_pool_state.rb'
autoload :ServerVersion, 'generated/azure_mgmt_sql/models/server_version.rb'
autoload :ServerState, 'generated/azure_mgmt_sql/models/server_state.rb'
autoload :TargetElasticPoolEditions, 'generated/azure_mgmt_sql/models/target_elastic_pool_editions.rb'
autoload :RestorePointTypes, 'generated/azure_mgmt_sql/models/restore_point_types.rb'
autoload :TransparentDataEncryptionActivityStates, 'generated/azure_mgmt_sql/models/transparent_data_encryption_activity_states.rb'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2149,16 +2149,6 @@ def begin_create_or_update_async(resource_group_name, server_name, database_name
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
end
end
# Deserialize Response
if status_code == 202
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Database.mapper()
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
rescue Exception => e
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
end
end

result
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,16 +929,6 @@ def begin_create_or_update_async(resource_group_name, server_name, elastic_pool_
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
end
end
# Deserialize Response
if status_code == 202
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = ElasticPool.mapper()
result.body = @client.deserialize(result_mapper, parsed_response, 'result.body')
rescue Exception => e
fail MsRest::DeserializationError.new('Error occurred in deserializing the response', e.message, e.backtrace, result)
end
end

result
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ class Database < MsRestAzure::Resource

include MsRestAzure

# @return [String] The collation of the Azure SQL database.
# @return [String] Kind of database. This is metadata used for the Azure
# portal experience.
attr_accessor :kind

# @return [String] The collation of the Azure SQL database. If createMode
# is not Default, this value is ignored.
attr_accessor :collation

# @return [DateTime] The creation date of the Azure SQL database (ISO8601
Expand All @@ -30,33 +35,44 @@ class Database < MsRestAzure::Resource
# @return [String] The ID of the Azure SQL database.
attr_accessor :database_id

# @return [DateTime] The recovery period start date of the Azure SQL
# database. This records the start date and time when recovery is
# available for this Azure SQL Database (ISO8601 format).
# @return [DateTime] This records the earliest start date and time that
# restore is available for this Azure SQL Database (ISO8601 format).
attr_accessor :earliest_restore_date

# @return [CreateMode] Specifies the type of database to create. Possible
# values include: 'Copy', 'Default', 'NonReadableSecondary',
# 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', 'Restore'
# @return [CreateMode] Specifies the type of database to create. If
# createMode is not set to Default, sourceDatabaseId must be specified.
# If createMode is set to PointInTimeRestore, then restorePointInTime
# must be specified. If createMode is set to Restore, then
# sourceDatabaseDeletionDate must be specified. Possible values include:
# 'Copy', 'Default', 'NonReadableSecondary', 'OnlineSecondary',
# 'PointInTimeRestore', 'Recovery', 'Restore'
attr_accessor :create_mode

# @return [String] Conditional. Specifies the resource ID of the source
# database. If createMode is not set to Default, then this value must be
# specified. The name of the source database must be the same. NOTE:
# Collation, Edition, and MaxSizeBytes must remain the same while the
# link is active. Values specified for these parameters will be ignored.
# @return [String] Conditional. If createMode is not set to Default, then
# this value must be specified. Specifies the resource ID of the source
# database. If createMode is NonReadableSecondary or OnlineSecondary, the
# name of the source database must be the same as this new database.
attr_accessor :source_database_id

# @return [DateTime] Conditional. If createMode is set to
# PointInTimeRestore, then this value must be specified. Specifies the
# point in time (ISO8601 format) of the source database that will be
# restored to create the new database. Must be greater than or equal to
# the source database's earliestRestoreDate value.
attr_accessor :restore_point_in_time

# @return [DatabaseEditions] The edition of the Azure SQL database. The
# DatabaseEditions enumeration contains all the valid editions. Possible
# values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium',
# 'Free', 'Stretch', 'DataWarehouse'
# DatabaseEditions enumeration contains all the valid editions. If
# createMode is NonReadableSecondary or OnlineSecondary, this value is
# ignored. Possible values include: 'Web', 'Business', 'Basic',
# 'Standard', 'Premium', 'Free', 'Stretch', 'DataWarehouse', 'System'
attr_accessor :edition

# @return [String] The max size of the Azure SQL database expressed in
# bytes. Note: Only the following sizes are supported (in addition to
# limitations being placed on each edition): { 100 MB | 500 MB |1 GB | 5
# GB | 10 GB | 20 GB | 30 GB … 150 GB | 200 GB … 500 GB }
# bytes. If createMode is not Default, this value is ignored. Note: Only
# the following sizes are supported (in addition to limitations being
# placed on each edition): { 100 MB | 500 MB |1 GB | 5 GB | 10 GB | 20 GB
# | 30 GB … 150 GB | 200 GB … 500 GB }
attr_accessor :max_size_bytes

# @return The configured Service Level Objective ID of the Azure SQL
Expand All @@ -70,12 +86,14 @@ class Database < MsRestAzure::Resource
# Objective that is in the process of being applied to the Azure SQL
# database. Once successfully updated, it will match the value of
# serviceLevelObjective property. Possible values include: 'Basic', 'S0',
# 'S1', 'S2', 'S3', 'P1', 'P2', 'P3'
# 'S1', 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System',
# 'System1', 'System2', 'System3', 'System4'
attr_accessor :requested_service_objective_name

# @return [ServiceObjectiveName] The current Service Level Objective of
# the Azure SQL database. Possible values include: 'Basic', 'S0', 'S1',
# 'S2', 'S3', 'P1', 'P2', 'P3'
# 'S2', 'S3', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'System',
# 'System1', 'System2', 'System3', 'System4'
attr_accessor :service_level_objective

# @return [String] The status of the Azure SQL database.
Expand All @@ -92,9 +110,6 @@ class Database < MsRestAzure::Resource
# for this database. Expanded property
attr_accessor :service_tier_advisors

# @return [UpgradeHint] The upgrade hint for this database.
attr_accessor :upgrade_hint

# @return [Array<Schema>] The schemas from this database.
attr_accessor :schemas

Expand All @@ -106,6 +121,19 @@ class Database < MsRestAzure::Resource
# database.
attr_accessor :recommended_index

# @return The id indicating the failover group containing this database.
attr_accessor :failover_group_id

# @return [ReadScale] Conditional. If the database is a geo-secondary,
# readScale indicates whether read-only connections are allowed to this
# database or not. Possible values include: 'Enabled', 'Disabled'
attr_accessor :read_scale

# @return [SampleName] Indicates the name of the sample schema to apply
# when creating this database. If createMode is not Default, this value
# is ignored. Possible values include: 'AdventureWorksLT'
attr_accessor :sample_name


#
# Mapper for Database class as Ruby Hash.
Expand Down Expand Up @@ -164,6 +192,14 @@ def self.mapper()
}
}
},
kind: {
required: false,
read_only: true,
serialized_name: 'kind',
type: {
name: 'String'
}
},
collation: {
required: false,
serialized_name: 'properties.collation',
Expand Down Expand Up @@ -225,6 +261,13 @@ def self.mapper()
name: 'String'
}
},
restore_point_in_time: {
required: false,
serialized_name: 'properties.restorePointInTime',
type: {
name: 'DateTime'
}
},
edition: {
required: false,
serialized_name: 'properties.edition',
Expand Down Expand Up @@ -300,15 +343,6 @@ def self.mapper()
}
}
},
upgrade_hint: {
required: false,
read_only: true,
serialized_name: 'properties.upgradeHint',
type: {
name: 'Composite',
class_name: 'UpgradeHint'
}
},
schemas: {
required: false,
read_only: true,
Expand Down Expand Up @@ -356,6 +390,29 @@ def self.mapper()
}
}
}
},
failover_group_id: {
required: false,
read_only: true,
serialized_name: 'properties.failoverGroupId',
type: {
name: 'String'
}
},
read_scale: {
required: false,
serialized_name: 'properties.readScale',
type: {
name: 'Enum',
module: 'ReadScale'
}
},
sample_name: {
required: false,
serialized_name: 'properties.sampleName',
type: {
name: 'String'
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module DatabaseEditions
Free = "Free"
Stretch = "Stretch"
DataWarehouse = "DataWarehouse"
System = "System"
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Models
#
# Represents Azure SQL Database metrics.
#
class DatabaseMetric
class DatabaseMetric < SqlSubResource

include MsRestAzure

Expand Down Expand Up @@ -43,6 +43,22 @@ def self.mapper()
name: 'Composite',
class_name: 'DatabaseMetric',
model_properties: {
name: {
required: false,
read_only: true,
serialized_name: 'name',
type: {
name: 'String'
}
},
id: {
required: false,
read_only: true,
serialized_name: 'id',
type: {
name: 'String'
}
},
resource_name: {
required: false,
read_only: true,
Expand Down
Loading