/// <summary>
        /// Converts from an API object to a PowerShell object
        /// </summary>
        /// <param name="s">The object to transform</param>
        /// <returns>The converted edition Service Level Objective capability model</returns>
        private ServiceObjectiveCapabilityModel CreateSupportedSLOModel(Management.Sql.Models.ServiceObjectiveCapability s)
        {
            ServiceObjectiveCapabilityModel slo = new ServiceObjectiveCapabilityModel();

            slo.Id = s.Id;
            slo.ServiceObjectiveName = s.Name;
            slo.Status            = s.Status;
            slo.SupportedMaxSizes = s.SupportedMaxSizes.Select(m => { return(CreateSupportedMaxSizeModel(m)); }).ToList();

            return(slo);
        }
示例#2
0
        /// <summary>
        /// Converts from an API object to a PowerShell object
        /// </summary>
        /// <param name="s">The object to transform</param>
        /// <returns>The converted edition Service Level Objective capability model</returns>
        private ServiceObjectiveCapabilityModel CreateSupportedSLOModel(Management.Sql.Models.ServiceObjectiveCapability s)
        {
            ServiceObjectiveCapabilityModel slo = new ServiceObjectiveCapabilityModel();

            slo.Id = s.Id;
            slo.ServiceObjectiveName = s.Name;
            slo.Status = s.Status.ToString();

            // Vcore service objectives don't have supported max sizes, they have max size ranges
            if (s.SupportedMaxSizes != null)
            {
                slo.SupportedMaxSizes = s.SupportedMaxSizes.Select(CreateSupportedMaxSizeModel).ToList();
            }

            return(slo);
        }