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

[AutoPR web/resource-manager] Add 201 response to AppServicePlans_CreateOrUpdate #1832

Closed
Closed
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
2 changes: 1 addition & 1 deletion azure_sdk/lib/azure_sdk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.

require 'latest/latest_profile_client'
require 'v2017_03_09/v2017_03_09_profile_client'
require 'latest/latest_profile_client'
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ class AppServicePlan < Resource
# 'Canceled', 'InProgress', 'Deleting'
attr_accessor :provisioning_state

# @return [String] Kind of resource.
attr_accessor :app_service_plan_kind

# @return [String] MDM ID of the App Service plan.
attr_accessor :mdm_id

# @return [Integer] Current worker count.
attr_accessor :current_number_of_workers

# @return [String] Current worker size.
attr_accessor :current_worker_size

# @return [Integer] Worker count.
attr_accessor :number_of_workers

# @return [String] Worker size.
attr_accessor :worker_size

# @return [SkuDescription]
attr_accessor :sku

Expand Down Expand Up @@ -273,6 +291,54 @@ def self.mapper()
module: 'ProvisioningState'
}
},
app_service_plan_kind: {
required: false,
read_only: true,
serialized_name: 'properties.kind',
type: {
name: 'String'
}
},
mdm_id: {
required: false,
read_only: true,
serialized_name: 'properties.mdmId',
type: {
name: 'String'
}
},
current_number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.currentNumberOfWorkers',
type: {
name: 'Number'
}
},
current_worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.currentWorkerSize',
type: {
name: 'String'
}
},
number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.numberOfWorkers',
type: {
name: 'Number'
}
},
worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.workerSize',
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ class AppServicePlan < Resource
# 'Canceled', 'InProgress', 'Deleting'
attr_accessor :provisioning_state

# @return [String] Kind of resource.
attr_accessor :app_service_plan_kind

# @return [String] MDM ID of the App Service plan.
attr_accessor :mdm_id

# @return [Integer] Current worker count.
attr_accessor :current_number_of_workers

# @return [String] Current worker size.
attr_accessor :current_worker_size

# @return [Integer] Worker count.
attr_accessor :number_of_workers

# @return [String] Worker size.
attr_accessor :worker_size

# @return [SkuDescription]
attr_accessor :sku

Expand Down Expand Up @@ -273,6 +291,54 @@ def self.mapper()
module: 'ProvisioningState'
}
},
app_service_plan_kind: {
required: false,
read_only: true,
serialized_name: 'properties.kind',
type: {
name: 'String'
}
},
mdm_id: {
required: false,
read_only: true,
serialized_name: 'properties.mdmId',
type: {
name: 'String'
}
},
current_number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.currentNumberOfWorkers',
type: {
name: 'Number'
}
},
current_worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.currentWorkerSize',
type: {
name: 'String'
}
},
number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.numberOfWorkers',
type: {
name: 'Number'
}
},
worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.workerSize',
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ class AppServicePlan < Resource
# 'Canceled', 'InProgress', 'Deleting'
attr_accessor :provisioning_state

# @return [String] Kind of resource.
attr_accessor :app_service_plan_kind

# @return [String] MDM ID of the App Service plan.
attr_accessor :mdm_id

# @return [Integer] Current worker count.
attr_accessor :current_number_of_workers

# @return [String] Current worker size.
attr_accessor :current_worker_size

# @return [Integer] Worker count.
attr_accessor :number_of_workers

# @return [String] Worker size.
attr_accessor :worker_size

# @return [SkuDescription]
attr_accessor :sku

Expand Down Expand Up @@ -273,6 +291,54 @@ def self.mapper()
module: 'ProvisioningState'
}
},
app_service_plan_kind: {
required: false,
read_only: true,
serialized_name: 'properties.kind',
type: {
name: 'String'
}
},
mdm_id: {
required: false,
read_only: true,
serialized_name: 'properties.mdmId',
type: {
name: 'String'
}
},
current_number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.currentNumberOfWorkers',
type: {
name: 'Number'
}
},
current_worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.currentWorkerSize',
type: {
name: 'String'
}
},
number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.numberOfWorkers',
type: {
name: 'Number'
}
},
worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.workerSize',
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,24 @@ class AppServicePlan < Resource
# 'Canceled', 'InProgress', 'Deleting'
attr_accessor :provisioning_state

# @return [String] Kind of resource.
attr_accessor :app_service_plan_kind

# @return [String] MDM ID of the App Service plan.
attr_accessor :mdm_id

# @return [Integer] Current worker count.
attr_accessor :current_number_of_workers

# @return [String] Current worker size.
attr_accessor :current_worker_size

# @return [Integer] Worker count.
attr_accessor :number_of_workers

# @return [String] Worker size.
attr_accessor :worker_size

# @return [SkuDescription]
attr_accessor :sku

Expand Down Expand Up @@ -273,6 +291,54 @@ def self.mapper()
module: 'ProvisioningState'
}
},
app_service_plan_kind: {
required: false,
read_only: true,
serialized_name: 'properties.kind',
type: {
name: 'String'
}
},
mdm_id: {
required: false,
read_only: true,
serialized_name: 'properties.mdmId',
type: {
name: 'String'
}
},
current_number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.currentNumberOfWorkers',
type: {
name: 'Number'
}
},
current_worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.currentWorkerSize',
type: {
name: 'String'
}
},
number_of_workers: {
required: false,
read_only: true,
serialized_name: 'properties.numberOfWorkers',
type: {
name: 'Number'
}
},
worker_size: {
required: false,
read_only: true,
serialized_name: 'properties.workerSize',
type: {
name: 'String'
}
},
sku: {
required: false,
serialized_name: 'sku',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3188,7 +3188,7 @@ def begin_create_or_update_async(resource_group_name, name, app_service_plan, cu
http_response = result.response
status_code = http_response.status
response_content = http_response.body
unless status_code == 200 || status_code == 202
unless status_code == 200 || status_code == 201 || status_code == 202
error_model = JSON.load(response_content)
fail MsRestAzure::AzureOperationError.new(result.request, http_response, error_model)
end
Expand All @@ -3205,6 +3205,16 @@ def begin_create_or_update_async(resource_group_name, name, app_service_plan, cu
end
end
# Deserialize Response
if status_code == 201
begin
parsed_response = response_content.to_s.empty? ? nil : JSON.load(response_content)
result_mapper = Azure::Web::Mgmt::V2016_09_01::Models::AppServicePlan.mapper()
result.body = @client.deserialize(result_mapper, parsed_response)
rescue Exception => e
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)
Expand Down
Loading