/// <summary>
        /// Execute the cmdlet
        /// </summary>
        protected override void ProcessRecordInternal()
        {
            AutoscaleSettingResource parameters = this.CreateAutoscaleSettingResource();

            // The result of this operation is operation (AutoscaleSettingResource) is being discarded for backwards compatibility
            var result   = this.MonitorManagementClient.AutoscaleSettings.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName: this.ResourceGroup, autoscaleSettingName: this.Name, parameters: parameters).Result;
            var response = new PSAddAutoscaleSettingOperationResponse()
            {
                RequestId   = result.RequestId,
                StatusCode  = result.Response != null ? result.Response.StatusCode : HttpStatusCode.OK,
                SettingSpec = result.Body
            };

            WriteObject(response);
        }
        /// <summary>
        /// Execute the cmdlet
        /// </summary>
        protected override void ProcessRecordInternal()
        {
            if (ShouldProcess(
                    target: string.Format("Create/update an autoscale setting: {0} from resource group: {1}", this.Name, this.ResourceGroupName),
                    action: "Create/update an autoscale setting"))
            {
                AutoscaleSettingResource parameters = this.CreateAutoscaleSettingResource();

                // The result of this operation is operation (AutoscaleSettingResource) is being discarded for backwards compatibility
                var result   = this.MonitorManagementClient.AutoscaleSettings.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName: this.ResourceGroupName, autoscaleSettingName: this.Name, parameters: parameters).Result;
                var response = new PSAddAutoscaleSettingOperationResponse()
                {
                    RequestId   = result.RequestId,
                    StatusCode  = result.Response != null ? result.Response.StatusCode : HttpStatusCode.OK,
                    SettingSpec = TransitionHelpers.ConvertNamespace(result.Body)
                };

                WriteObject(response);
            }
        }
        /// <summary>
        /// Execute the cmdlet
        /// </summary>
        protected override void ProcessRecordInternal()
        {
            this.WriteIdentifiedWarning(
                cmdletName: "Add-AzureRmAutoscaleSetting",
                topic: "Parameter name change",
                message: "The parameter plural names for the parameters will be deprecated in a future breaking change release in favor of he singular versions of the same names.");
            if (ShouldProcess(
                    target: string.Format("Create/update an autoscale setting: {0} from resource group: {1}", this.Name, this.ResourceGroupName),
                    action: "Create/update an autoscale setting"))
            {
                AutoscaleSettingResource parameters = this.CreateAutoscaleSettingResource();

                // The result of this operation is operation (AutoscaleSettingResource) is being discarded for backwards compatibility
                var result   = this.MonitorManagementClient.AutoscaleSettings.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName: this.ResourceGroupName, autoscaleSettingName: this.Name, parameters: parameters).Result;
                var response = new PSAddAutoscaleSettingOperationResponse()
                {
                    RequestId   = result.RequestId,
                    StatusCode  = result.Response != null ? result.Response.StatusCode : HttpStatusCode.OK,
                    SettingSpec = result.Body
                };

                WriteObject(response);
            }
        }