Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the Advisor class.
 /// </summary>
 /// <param name="autoExecuteStatus">Gets the auto-execute status
 /// (whether to let the system execute the recommendations) of this
 /// advisor. Possible values are 'Enabled' and 'Disabled'. Possible
 /// values include: 'Enabled', 'Disabled', 'Default'</param>
 /// <param name="id">Resource ID.</param>
 /// <param name="name">Resource name.</param>
 /// <param name="type">Resource type.</param>
 /// <param name="kind">Resource kind.</param>
 /// <param name="location">Resource location.</param>
 /// <param name="advisorStatus">Gets the status of availability of this
 /// advisor to customers. Possible values are 'GA', 'PublicPreview',
 /// 'LimitedPublicPreview' and 'PrivatePreview'. Possible values
 /// include: 'GA', 'PublicPreview', 'LimitedPublicPreview',
 /// 'PrivatePreview'</param>
 /// <param name="autoExecuteStatusInheritedFrom">Gets the resource from
 /// which current value of auto-execute status is inherited.
 /// Auto-execute status can be set on (and inherited from) different
 /// levels in the resource hierarchy. Possible values are
 /// 'Subscription', 'Server', 'ElasticPool', 'Database' and 'Default'
 /// (when status is not explicitly set on any level). Possible values
 /// include: 'Default', 'Subscription', 'Server', 'ElasticPool',
 /// 'Database'</param>
 /// <param name="recommendationsStatus">Gets that status of
 /// recommendations for this advisor and reason for not having any
 /// recommendations. Possible values include, but are not limited to,
 /// 'Ok' (Recommendations available),LowActivity (not enough workload
 /// to analyze), 'DbSeemsTuned' (Database is doing well), etc.</param>
 /// <param name="lastChecked">Gets the time when the current resource
 /// was analyzed for recommendations by this advisor.</param>
 /// <param name="recommendedActions">Gets the recommended actions for
 /// this advisor.</param>
 public Advisor(AutoExecuteStatus autoExecuteStatus, string id = default(string), string name = default(string), string type = default(string), string kind = default(string), string location = default(string), AdvisorStatus?advisorStatus = default(AdvisorStatus?), AutoExecuteStatusInheritedFrom?autoExecuteStatusInheritedFrom = default(AutoExecuteStatusInheritedFrom?), string recommendationsStatus = default(string), System.DateTime?lastChecked = default(System.DateTime?), IList <RecommendedAction> recommendedActions = default(IList <RecommendedAction>))
     : base(id, name, type)
 {
     Kind              = kind;
     Location          = location;
     AdvisorStatus     = advisorStatus;
     AutoExecuteStatus = autoExecuteStatus;
     AutoExecuteStatusInheritedFrom = autoExecuteStatusInheritedFrom;
     RecommendationsStatus          = recommendationsStatus;
     LastChecked        = lastChecked;
     RecommendedActions = recommendedActions;
     CustomInit();
 }
Exemple #2
0
        internal static string ToSerializedValue(this AutoExecuteStatus value)
        {
            switch (value)
            {
            case AutoExecuteStatus.Enabled:
                return("Enabled");

            case AutoExecuteStatus.Disabled:
                return("Disabled");

            case AutoExecuteStatus.Default:
                return("Default");
            }
            return(null);
        }
 public static string ToSerialString(this AutoExecuteStatus value) => value switch
 {